Package com.axelor.db
Class Model
java.lang.Object
com.axelor.db.Model
- Direct Known Subclasses:
AuditableModel
,JpaModel
,MetaAttrs
,MetaHelp
,MetaTranslation
The base abstract model class to extend all domain objects.
The derived model classes should implement getId()
and setId(Long)
using
appropriate GeneratedValue.strategy()
.
A generic implementation JpaModel
should be used in most cases if sequence of record
ids are important.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCid()
Get the collection id of the record.abstract Long
getId()
boolean
Check whether the record is selected in the UI widget.void
setArchived
(Boolean archived) void
Set the collection id for the record.abstract void
void
setSelected
(boolean selected) Set the selected state of the record.void
setVersion
(Integer version)
-
Constructor Details
-
Model
public Model()
-
-
Method Details
-
getId
-
setId
-
getArchived
-
setArchived
-
getVersion
-
setVersion
-
getCid
Get the collection id of the record. The collection widgets use this value to identify exact record from the action/save request responses.- Returns:
- collection id
-
setCid
Set the collection id for the record. The collection widgets use this value to identify exact record from the action/save request responses.- Parameters:
cid
- the collection id
-
setSelected
public void setSelected(boolean selected) Set the selected state of the record. The UI widget will use this flag to mark/unmark the selection state.- Parameters:
selected
- selected state flag
-
isSelected
public boolean isSelected()Check whether the record is selected in the UI widget.- Returns:
- selection state
-