public class EntityOptionsImpl extends CommonOptionsImpl implements EntityOptions
| Modifier and Type | Field and Description |
|---|---|
static String |
OPTION_NO_MODELDEFAULTS
don't apply model defaults.
|
static String |
OPTION_NO_PRIMARY
don't generate ID as primary key.
|
static String |
OPTION_NORMTEXT
normText is provided.
|
static String |
OPTION_REMOTE
enable remoting.
|
static String |
OPTION_ROOT
root entity.
|
static String |
OPTION_ROOTCLASSID
rootclassid is provided.
|
static String |
OPTION_ROOTID
rootid is provided.
|
static String |
OPTION_TABLESERIAL
column tableserial is provided.
|
static String |
OPTION_TOKENLOCK
token lock columns editedBy/Since/Expiry are provided.
|
BIND_SIZE, OPTION_BIND, OPTION_DERIVED, OPTION_MAPNULL, OPTION_NOCONSTANT, OPTION_NODECLARE, OPTION_NOMETHOD, OPTION_READONLY, OPTION_SETGET, OPTION_SUPER, OPTION_TRIM, OPTION_TRIM_READ, OPTION_TRIM_WRITE, OPTION_WRITEONLY| Constructor and Description |
|---|
EntityOptionsImpl(EntityFactory factory,
Entity entity,
SourceInfo sourceInfo)
Creates entity options.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
applyOption(String option,
Boolean ctrl)
Applies given option string.
|
Entity |
getEntity()
Gets the entity this option-set belongs to.
|
List<String> |
getSorting()
Gets the default sorting options.
|
TrackType |
getTrackType()
Gets the tracking type.
|
boolean |
isNoPrimaryKey()
true if [NOPKEY]-option set.
|
boolean |
isNormTextProvided()
true if [NORMTEXT]-option set.
|
boolean |
isRemote()
Returns whether entity supports remoting.
|
boolean |
isRoot()
true if [ROOT]-option set
|
boolean |
isRootClassIdProvided()
true if [ROOTCLASSID]-option set.
|
boolean |
isRootIdProvided()
true if [ROOTID]-option set.
|
boolean |
isTableSerialProvided()
true if [TABLESERIAL]-option set.
|
boolean |
isTokenLockProvided()
true if [EDITEDBY]-option set.
|
boolean |
noModelDefaults()
Returns whether global model defaults should be applied or not.
|
boolean |
processSorting(String token)
Checks that the sorting string starts with a + or -.
|
void |
setEditedByProvided(boolean tokenLockProvided) |
void |
setNoModelDefaults(boolean noModelDefaults) |
void |
setNoPrimaryKey(boolean noPrimary) |
void |
setNormTextProvided(boolean normText) |
void |
setRemote(boolean remote) |
void |
setRootClassIdProvided(boolean rootClassId) |
void |
setRootEntity(boolean rootEntity) |
void |
setRootIdProvided(boolean rootId) |
void |
setTableSerialProvided(boolean tableSerial) |
void |
setTrackType(TrackType trackType) |
addBindOption, createModelException, getAccessScope, getBindOptions, getComment, getSourceInfo, isAutoSelect, isBind, isDerived, isFromSuper, isLowerCase, isMapNull, isMaxCol, isNoConstant, isNoDeclare, isNoMethod, isReadOnly, isSetGet, isTrimRead, isTrimWrite, isUpperCase, isWriteOnly, processBindOption, processOption, removeBindOption, setAccessScope, setAutoSelect, setBind, setBindOptions, setComment, setDerived, setFromSuper, setLowerCase, setMapNull, setMaxCol, setNoConstant, setNoDeclare, setNoMethod, setReadOnly, setSetGet, setTrimRead, setTrimWrite, setUpperCase, setWriteOnly, validateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAccessScope, getBindOptions, getComment, isAutoSelect, isBind, isDerived, isFromSuper, isLowerCase, isMapNull, isMaxCol, isNoConstant, isNoDeclare, isNoMethod, isReadOnly, isSetGet, isTrimRead, isTrimWrite, isUpperCase, isWriteOnly, validatepublic static final String OPTION_NO_MODELDEFAULTS
public static final String OPTION_NO_PRIMARY
public static final String OPTION_TABLESERIAL
public static final String OPTION_TOKENLOCK
public static final String OPTION_NORMTEXT
public static final String OPTION_ROOT
public static final String OPTION_ROOTID
public static final String OPTION_ROOTCLASSID
public static final String OPTION_REMOTE
public EntityOptionsImpl(EntityFactory factory, Entity entity, SourceInfo sourceInfo)
factory - the factoryentity - the entity the options belong tosourceInfo - the source infopublic Entity getEntity()
EntityOptionsgetEntity in interface EntityOptionspublic boolean noModelDefaults()
EntityOptionsnoModelDefaults in interface EntityOptionspublic boolean applyOption(String option, Boolean ctrl) throws ModelException
CommonOptionsImplapplyOption in class CommonOptionsImploption - the option stringctrl - option control: true if turn option on, false if oprion off, null if on/off missing (defaults to on)ModelException - if applying the option failedpublic boolean processSorting(String token)
token - the sorting tokenpublic boolean isNoPrimaryKey()
EntityOptionsisNoPrimaryKey in interface EntityOptionspublic TrackType getTrackType()
EntityOptionsgetTrackType in interface EntityOptionspublic boolean isTableSerialProvided()
EntityOptionsisTableSerialProvided in interface EntityOptionspublic boolean isTokenLockProvided()
EntityOptionsisTokenLockProvided in interface EntityOptionspublic boolean isNormTextProvided()
EntityOptionsisNormTextProvided in interface EntityOptionspublic boolean isRoot()
EntityOptionsisRoot in interface EntityOptionspublic boolean isRootIdProvided()
EntityOptionsisRootIdProvided in interface EntityOptionspublic boolean isRootClassIdProvided()
EntityOptionsisRootClassIdProvided in interface EntityOptionspublic boolean isRemote()
EntityOptionsisRemote in interface EntityOptionspublic List<String> getSorting()
EntityOptionsgetSorting in interface EntityOptionspublic void setNoModelDefaults(boolean noModelDefaults)
public void setTrackType(TrackType trackType)
public void setEditedByProvided(boolean tokenLockProvided)
public void setNormTextProvided(boolean normText)
public void setNoPrimaryKey(boolean noPrimary)
public void setTableSerialProvided(boolean tableSerial)
public void setRootEntity(boolean rootEntity)
public void setRootIdProvided(boolean rootId)
public void setRootClassIdProvided(boolean rootClassId)
public void setRemote(boolean remote)
Tentackle - a domain driven enterprise framework