com.livis.livingtalks.model
Class PitemModel
java.lang.Object
|
+--com.livis.livingtalks.model.AbstractModel
|
+--com.livis.livingtalks.model.PitemModel
- Direct Known Subclasses:
- PitemWebImpl
- public class PitemModel
- extends AbstractModel
- See Also:
- Serialized Form
Methods inherited from class com.livis.livingtalks.model.AbstractModel |
assignAbstractModel,
checkForKeyCreation,
checkForNonEmptyKey,
getAutoKey,
getEditor,
getKey,
getTimestamp,
makeShort,
setAutoKey,
setEditor,
setKey,
setTimestamp,
setTimestampFromDate,
shallCreateKey,
touch,
XMLTagProperties |
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
start
public java.sql.Time start
blockKey
public java.lang.String blockKey
trackKey
public java.lang.String trackKey
PitemModel
public PitemModel()
assignPitemModel
protected PitemModel assignPitemModel(java.lang.String key,
java.lang.String editor,
java.lang.String timestamp,
java.sql.Time start,
java.lang.String blockKey,
java.lang.String trackKey)
getModel
public PitemModel getModel()
setModel
public void setModel(PitemModel model)
init
public void init()
clear
public void clear()
- Description copied from class: AbstractModel
- Set this Model to a clear state suitable for data entry into a
clear form it is not recommended behaviour for a clear model to
pass a subsequent
AbstractModel.check()
test.
- Overrides:
- clear in class AbstractModel
getStart
public java.sql.Time getStart()
setStart
public void setStart(java.sql.Time start)
getBlockKey
public java.lang.String getBlockKey()
setBlockKey
public void setBlockKey(java.lang.String blockKey)
getTrackKey
public java.lang.String getTrackKey()
setTrackKey
public void setTrackKey(java.lang.String trackKey)
getStartHourString
public java.lang.String getStartHourString()
setStartHourString
public void setStartHourString(java.lang.String startHourString)
getStartMinuteString
public java.lang.String getStartMinuteString()
setStartMinuteString
public void setStartMinuteString(java.lang.String startMinuteString)
isKeyCreatable
public boolean isKeyCreatable()
- Description copied from class: AbstractModel
- Checks whether a key can, in theory, be created from other
model data.
This default implementation returns
false
. If
derived classes re-implement this to return true,
they should also overwrite AbstractModel.createKey()
to return a
suitable key and AbstractModel.checkForKeyCreation()
to test whether a
key is valid.
- Overrides:
- isKeyCreatable in class AbstractModel
- Tags copied from class: AbstractModel
- Returns:
true
if a key can be created- See Also:
AbstractModel.createKey()
,
AbstractModel.checkForKeyCreation()
createKey
protected java.lang.String createKey()
- Description copied from class: AbstractModel
- Creates a key from other model data which must pass the
AbstractModel.check()
test if AbstractModel.isKeyCreatable()
returns
true
.
The generated key is returned. This default implementation
always throws an exception.
- Overrides:
- createKey in class AbstractModel
- Tags copied from class: AbstractModel
- Throws:
- LivingTalksException - if cannot create a key.
- See Also:
AbstractModel.isKeyCreatable()
,
AbstractModel.check()
check
public void check()
- Description copied from class: AbstractModel
- Checks if model is logically OK.
This default implementation checks for an non-empty key and --
if
AbstractModel.isKeyCreatable()
returns true -- whether the key can
in fact be created (using AbstractModel.checkForKeyCreation()
).
Also, special charcters (<, >, &, ", ', \r, and \n) are removed
from the key.
- Overrides:
- check in class AbstractModel
- Tags copied from class: AbstractModel
- Throws:
- LivingTalksException - if model is invalid. Must not
check for duplicate keys as this
is checked anyway at database
insertion time.
- See Also:
AbstractModel.isKeyCreatable()
,
AbstractModel.createKey()
xmlTagPropertiesStore
protected java.util.List xmlTagPropertiesStore()
- Overrides:
- xmlTagPropertiesStore in class AbstractModel