- java.lang.Object
-
- org.tentackle.model.ModelDefaults
-
public class ModelDefaults extends java.lang.ObjectDefaults for model parsing.Simply set a default attribute to a non-null value to be honored during model parsing. Only logically "higher" values will be copied to the model. For example: fulltracked will overwrite tracked, but a default of tracked will not overwrite fulltracked if already defined in the model. Accordingly deletionCascaded will never clear the model setting to false if true.
- Author:
- harald
-
-
Constructor Summary
Constructors Constructor Description ModelDefaults()Creates the defaults.ModelDefaults(java.lang.String str)Creates the defaults from a string.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Clears the defaults.java.lang.BooleangetAutoSelect()Gets the [autoselect] default.java.lang.BooleangetBind()Gets the [bind] default.java.lang.BooleangetDeletionCascaded()Gets the cascaded delete default.java.lang.BooleangetRemote()Gets the [remote] default.java.lang.BooleangetRoot()Gets the root default.java.lang.BooleangetRootClassId()Gets the rootclassid default.java.lang.BooleangetRootId()Gets the rootid default.java.lang.BooleangetSize()Gets the [size] default.TrackTypegetTrackType()Gets the tracktype default.voidparse(java.lang.String str)Parses the defaults from a string.
-
-
-
Constructor Detail
-
ModelDefaults
public ModelDefaults()
Creates the defaults.
-
ModelDefaults
public ModelDefaults(java.lang.String str) throws ModelExceptionCreates the defaults from a string.- Parameters:
str- the string- Throws:
ModelException- if parsing failed
-
-
Method Detail
-
parse
public void parse(java.lang.String str) throws ModelExceptionParses the defaults from a string.- Parameters:
str- the string- Throws:
ModelException- if parsing failed
-
clear
public void clear()
Clears the defaults.
-
getTrackType
public TrackType getTrackType()
Gets the tracktype default.- Returns:
- the track type
-
getDeletionCascaded
public java.lang.Boolean getDeletionCascaded()
Gets the cascaded delete default.- Returns:
- the cascaded delete
-
getRoot
public java.lang.Boolean getRoot()
Gets the root default.- Returns:
- true if determine root option according to model
-
getRootId
public java.lang.Boolean getRootId()
Gets the rootid default.- Returns:
- true if determine rootid option according to model
-
getRootClassId
public java.lang.Boolean getRootClassId()
Gets the rootclassid default.- Returns:
- true if determine rootclassid option according to model
-
getBind
public java.lang.Boolean getBind()
Gets the [bind] default.- Returns:
- true if set [bind] option
-
getSize
public java.lang.Boolean getSize()
Gets the [size] default.- Returns:
- true if set [size] option
-
getAutoSelect
public java.lang.Boolean getAutoSelect()
Gets the [autoselect] default.- Returns:
- true if set [autoselect] option
-
getRemote
public java.lang.Boolean getRemote()
Gets the [remote] default.- Returns:
- true i set [remote] option
-
-