Package com.axelor.db
Class Model
- java.lang.Object
-
- com.axelor.db.Model
-
- Direct Known Subclasses:
AuditableModel,JpaModel,MetaAttrs,MetaHelp,MetaTranslation
@MappedSuperclass public abstract class Model extends Object
The base abstract model class to extend all domain objects.The derived model classes should implement
getId()andsetId(Long)using appropriateGeneratedValue.strategy().A generic implementation
JpaModelshould be used in most cases if sequence of record ids are important.
-
-
Constructor Summary
Constructors Constructor Description Model()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description BooleangetArchived()abstract LonggetId()IntegergetVersion()booleanisSelected()Check whether the record is selected in the UI widget.voidsetArchived(Boolean archived)abstract voidsetId(Long id)voidsetSelected(boolean selected)Set the selected state of the record.voidsetVersion(Integer version)
-
-
-
Method Detail
-
getId
public abstract Long getId()
-
setId
public abstract void setId(Long id)
-
getArchived
public Boolean getArchived()
-
setArchived
public void setArchived(Boolean archived)
-
getVersion
public Integer getVersion()
-
setVersion
public void setVersion(Integer version)
-
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
-
-