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

Field Summary
 java.lang.String blockKey
           
 java.sql.Time start
           
 java.lang.String trackKey
           
 
Fields inherited from class com.livis.livingtalks.model.AbstractModel
editor, key, timestamp
 
Constructor Summary
PitemModel()
           
 
Method Summary
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)
           
 void check()
          Checks if model is logically OK.
 void clear()
          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 check() test.
protected  java.lang.String createKey()
          Creates a key from other model data which must pass the check() test if isKeyCreatable() returns true.
 java.lang.String getBlockKey()
           
 PitemModel getModel()
           
 java.sql.Time getStart()
           
 java.lang.String getStartHourString()
           
 java.lang.String getStartMinuteString()
           
 java.lang.String getTrackKey()
           
 void init()
           
 boolean isKeyCreatable()
          Checks whether a key can, in theory, be created from other model data.
 void setBlockKey(java.lang.String blockKey)
           
 void setModel(PitemModel model)
           
 void setStart(java.sql.Time start)
           
 void setStartHourString(java.lang.String startHourString)
           
 void setStartMinuteString(java.lang.String startMinuteString)
           
 void setTrackKey(java.lang.String trackKey)
           
protected  java.util.List xmlTagPropertiesStore()
           
 
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
 

Field Detail

start

public java.sql.Time start

blockKey

public java.lang.String blockKey

trackKey

public java.lang.String trackKey
Constructor Detail

PitemModel

public PitemModel()
Method Detail

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