Package de.xima.fc.entities
Class ClientCounter
- java.lang.Object
-
- de.xima.cmn.dao.model.AEntity<Long>
-
- All Implemented Interfaces:
de.xima.cmn.dao.interfaces.IEntity<Long>
,de.xima.cmn.dao.interfaces.ILockableEntity<Long>
,ICounter
,IDescriptionProviding
,ILockingVersionProviding
,IMandantDependent
,INameProviding
,ITransferable
,ITransferableEntity
,ITransferableLockableEntity
,IUUIDEntity
,Serializable
,Comparable<de.xima.cmn.dao.interfaces.IEntity<Long>>
@Entity public class ClientCounter extends AClientDependentEntity implements ICounter, Serializable
Counter entity inMandant
scope- Since:
- 7.0.0
- Author:
- XIMA Media GmbH
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
ATTR_COUNTER_VALUE
static String
ATTR_DATE_CREATED
static String
ATTR_DATE_EDITED
static String
ATTR_INITIAL_VALUE
static String
ATTR_RESET_CONDITION_TYPE
static String
ATTR_RESET_CONDITION_VALUE
static String
ATTR_RESET_DAY
static String
ATTR_RESET_MONTH
static String
ATTR_RESET_PERIODICALLY
static String
ATTR_RESET_TIME
static String
ATTR_RESET_WEEKDAY
static String
COL_COUNTER_VALUE
static String
COL_DATE_CREATED
static String
COL_DATE_EDITED
static String
COL_INITIAL_VALUE
static String
COL_RESET_AUTOMATICALLY
static String
COL_RESET_DAY
static String
COL_RESET_MONTH
static String
COL_RESET_TIME
static String
COL_RESET_TYPE
static String
COL_RESET_VALUE
static String
COL_RESET_WEEKDAY
-
Fields inherited from class de.xima.fc.entities.AClientDependentEntity
COL_CLIENTID, mandant
-
Fields inherited from class de.xima.fc.entities.AbstractLockableEntity
COL_LOCKINGVERSION, lockingVersion
-
Fields inherited from class de.xima.fc.entities.AbstractEntity
COL_ID, id
-
Fields inherited from interface de.xima.fc.entities.interfaces.IDescriptionProviding
ATTR_BESCHREIBUNG, ATTR_DESCRIPTION, COL_DESCRIPTION
-
Fields inherited from interface de.xima.fc.entities.interfaces.IMandantDependent
ATTR_MANDANT, COL_CLIENT_ID
-
Fields inherited from interface de.xima.fc.entities.interfaces.INameProviding
ATTR_NAME, COL_NAME
-
Fields inherited from interface de.xima.fc.entities.interfaces.ITransferableEntity
IMPORT_ID, INVALID_ID
-
Fields inherited from interface de.xima.fc.entities.interfaces.IUUIDEntity
ATTR_UUID, COL_UUID, INVALID_UUID, INVALID_UUID_OBJECT, NULL_SAFE_UUID_TYPE, TYPE_NAME_UUID
-
-
Constructor Summary
Constructors Constructor Description ClientCounter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getBeschreibung()
long
getCounterValue()
Date
getDateCreated()
Date
getDateEdited()
String
getDescription()
Long
getId()
long
getInitialValue()
String
getName()
int
getResetDay()
Day of the month at which the counter should be reset.int
getResetMonth()
Month of the year at which the counter should be reset.LocalTime
getResetTime()
Date
getResetTimeDate()
ECounterResetType
getResetType()
long
getResetValue()
int
getResetWeekday()
DayOfWeek[]
getResetWeekdays()
Days of the week at which the counter should be reset.String
getUUID()
UUID
getUUIDObject()
boolean
isResetAutomatically()
void
setCounterValue(long counterValue)
void
setDateCreated(Date dateCreated)
void
setDateEdited(Date dateEdited)
void
setDescription(String description)
void
setId(Long id)
!!!WARNING: Currently values biggerInteger.MAX_VALUE
or lower thenInteger.MIN_VALUE
will be altered to null!!!void
setInitialValue(long initialValue)
void
setName(String name)
void
setResetAutomatically(boolean resetAutomatically)
void
setResetDay(int resetDay)
void
setResetMonth(int resetMonth)
void
setResetTime(LocalTime resetTime)
void
setResetTimeDate(Date resetTime)
void
setResetType(ECounterResetType resetType)
void
setResetValue(long resetConditionValue)
void
setResetWeekday(int resetWeekday)
void
setResetWeekdays(DayOfWeek[] resetWeekdays)
void
setUUID(String uuid)
void
setUUIDObject(UUID uuid)
-
Methods inherited from class de.xima.fc.entities.AClientDependentEntity
getMandant, setMandant
-
Methods inherited from class de.xima.fc.entities.AbstractLockableEntity
entityHasChanged, getLockingVersion, setLockingVersion, toString
-
Methods inherited from class de.xima.fc.entities.AbstractEntity
asIntValue, isPersisted, setId
-
Methods inherited from class de.xima.cmn.dao.model.AEntity
compareTo, equals, getDBTableName, hashCode
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface de.xima.fc.entities.interfaces.ICounter
getResetHour, getResetMinute
-
-
-
-
Field Detail
-
ATTR_COUNTER_VALUE
public static final String ATTR_COUNTER_VALUE
- See Also:
- Constant Field Values
-
ATTR_INITIAL_VALUE
public static final String ATTR_INITIAL_VALUE
- See Also:
- Constant Field Values
-
ATTR_DATE_CREATED
public static final String ATTR_DATE_CREATED
- See Also:
- Constant Field Values
-
ATTR_DATE_EDITED
public static final String ATTR_DATE_EDITED
- See Also:
- Constant Field Values
-
ATTR_RESET_PERIODICALLY
public static final String ATTR_RESET_PERIODICALLY
- See Also:
- Constant Field Values
-
ATTR_RESET_CONDITION_TYPE
public static final String ATTR_RESET_CONDITION_TYPE
- See Also:
- Constant Field Values
-
ATTR_RESET_CONDITION_VALUE
public static final String ATTR_RESET_CONDITION_VALUE
- See Also:
- Constant Field Values
-
ATTR_RESET_TIME
public static final String ATTR_RESET_TIME
- See Also:
- Constant Field Values
-
ATTR_RESET_WEEKDAY
public static final String ATTR_RESET_WEEKDAY
- See Also:
- Constant Field Values
-
ATTR_RESET_DAY
public static final String ATTR_RESET_DAY
- See Also:
- Constant Field Values
-
ATTR_RESET_MONTH
public static final String ATTR_RESET_MONTH
- See Also:
- Constant Field Values
-
COL_COUNTER_VALUE
public static final String COL_COUNTER_VALUE
- See Also:
- Constant Field Values
-
COL_INITIAL_VALUE
public static final String COL_INITIAL_VALUE
- See Also:
- Constant Field Values
-
COL_DATE_CREATED
public static final String COL_DATE_CREATED
- See Also:
- Constant Field Values
-
COL_DATE_EDITED
public static final String COL_DATE_EDITED
- See Also:
- Constant Field Values
-
COL_RESET_AUTOMATICALLY
public static final String COL_RESET_AUTOMATICALLY
- See Also:
- Constant Field Values
-
COL_RESET_TYPE
public static final String COL_RESET_TYPE
- See Also:
- Constant Field Values
-
COL_RESET_VALUE
public static final String COL_RESET_VALUE
- See Also:
- Constant Field Values
-
COL_RESET_TIME
public static final String COL_RESET_TIME
- See Also:
- Constant Field Values
-
COL_RESET_WEEKDAY
public static final String COL_RESET_WEEKDAY
- See Also:
- Constant Field Values
-
COL_RESET_DAY
public static final String COL_RESET_DAY
- See Also:
- Constant Field Values
-
COL_RESET_MONTH
public static final String COL_RESET_MONTH
- See Also:
- Constant Field Values
-
-
Method Detail
-
setId
public void setId(Long id)
Description copied from class:AbstractEntity
!!!WARNING: Currently values biggerInteger.MAX_VALUE
or lower thenInteger.MIN_VALUE
will be altered to null!!!- Specified by:
setId
in interfacede.xima.cmn.dao.interfaces.IEntity<Long>
- Overrides:
setId
in classAbstractEntity
- Parameters:
id
-Long
the database-id to set
-
getUUID
public String getUUID()
- Specified by:
getUUID
in interfaceIUUIDEntity
- Returns:
- UUID (Universal Unique Identifier) that identifies this type of entity. Usually is unique within a context,
e.g.
Mandant
,Projekt
, ...
-
setUUID
public void setUUID(String uuid)
- Specified by:
setUUID
in interfaceIUUIDEntity
-
getUUIDObject
public UUID getUUIDObject()
- Specified by:
getUUIDObject
in interfaceIUUIDEntity
-
setUUIDObject
public void setUUIDObject(UUID uuid)
-
getName
public String getName()
- Specified by:
getName
in interfaceINameProviding
- Returns:
- The name of this object.
-
setName
public void setName(String name)
-
getDescription
public String getDescription()
- Specified by:
getDescription
in interfaceIDescriptionProviding
- Returns:
- A human-readable description for this object.
-
setDescription
public void setDescription(String description)
-
getBeschreibung
public String getBeschreibung()
- Specified by:
getBeschreibung
in interfaceIDescriptionProviding
-
getCounterValue
public long getCounterValue()
- Specified by:
getCounterValue
in interfaceICounter
- Returns:
- current value of the counter
-
setCounterValue
public void setCounterValue(long counterValue)
-
getInitialValue
public long getInitialValue()
- Specified by:
getInitialValue
in interfaceICounter
- Returns:
- value the counter should be reset to (directly or automatically)
-
setInitialValue
public void setInitialValue(long initialValue)
-
getDateCreated
public Date getDateCreated()
- Specified by:
getDateCreated
in interfaceICounter
- Returns:
- when the counter was created
-
setDateCreated
public void setDateCreated(Date dateCreated)
-
getDateEdited
public Date getDateEdited()
- Specified by:
getDateEdited
in interfaceICounter
- Returns:
- when the counter was last edited
-
setDateEdited
public void setDateEdited(Date dateEdited)
-
isResetAutomatically
public boolean isResetAutomatically()
- Specified by:
isResetAutomatically
in interfaceICounter
- Returns:
- whether or not the counter should reset itself automatically according to its reset configuration
-
setResetAutomatically
public void setResetAutomatically(boolean resetAutomatically)
-
getResetType
public ECounterResetType getResetType()
- Specified by:
getResetType
in interfaceICounter
- Returns:
- type of condition for resetting the counter automatically
-
setResetType
public void setResetType(ECounterResetType resetType)
-
getResetValue
public long getResetValue()
- Specified by:
getResetValue
in interfaceICounter
- Returns:
- value that needs to be met in order to trigger a counter reset. Only applicable for reset types
ECounterResetType.VALUE_GREATER_EQUAL
&ECounterResetType.VALUE_LESSER_EQUAL
-
setResetValue
public void setResetValue(long resetConditionValue)
-
getResetTime
public LocalTime getResetTime()
- Specified by:
getResetTime
in interfaceICounter
- Returns:
- time of the day at which the counter should be reset. Only applicable for reset types
ECounterResetType.TIME_DAILY
,ECounterResetType.TIME_WEEKLY
,ECounterResetType.TIME_MONTHLY
&ECounterResetType.TIME_YEARLY
-
setResetTime
public void setResetTime(LocalTime resetTime)
-
getResetTimeDate
public Date getResetTimeDate()
- Returns:
- The reset time as a date
-
setResetTimeDate
public void setResetTimeDate(Date resetTime)
-
getResetWeekday
public int getResetWeekday()
- Specified by:
getResetWeekday
in interfaceICounter
- Returns:
- Days of the week at which the counter should be reset, returned as a an XORed int
-
setResetWeekday
public void setResetWeekday(int resetWeekday)
-
getResetWeekdays
public DayOfWeek[] getResetWeekdays()
Days of the week at which the counter should be reset. Only applicable for reset typeECounterResetType.TIME_WEEKLY
-
setResetWeekdays
public void setResetWeekdays(DayOfWeek[] resetWeekdays)
-
getResetDay
public int getResetDay()
Description copied from interface:ICounter
Day of the month at which the counter should be reset. Only applicable for reset typesECounterResetType.TIME_MONTHLY
&ECounterResetType.TIME_YEARLY
- Specified by:
getResetDay
in interfaceICounter
-
setResetDay
public void setResetDay(int resetDay)
-
getResetMonth
public int getResetMonth()
Description copied from interface:ICounter
Month of the year at which the counter should be reset. Only applicable for reset typeECounterResetType.TIME_YEARLY
- Specified by:
getResetMonth
in interfaceICounter
-
setResetMonth
public void setResetMonth(int resetMonth)
-
-