net.jot.test
Class DBUser

java.lang.Object
  extended by net.jot.persistance.JOTModel
      extended by net.jot.test.DBUser

public class DBUser
extends JOTModel

Internal JOT class for self-test Test user for testing of SQL DB implementation

Author:
thibautc

Field Summary
 int age
           
 java.lang.String firstName
           
 java.lang.String lastName
           
 
Fields inherited from class net.jot.persistance.JOTModel
dataId, DEFAULT_STORAGE, queryImplClass
 
Constructor Summary
DBUser()
           
 
Method Summary
 void customize(JOTModelMapping mapping)
          Implements the customization (User defined tables modifications, ie: fields mappings, etc ...)
 java.lang.String defineStorage()
          Returns the "storage" to be used by this Model.
protected  int defineVersion()
           
 void resetTable()
           
 java.lang.String toString()
           
protected  void upgrade(int fromVersion, JOTDBUpgrader upgrader)
           
 void upgradeTable(int fromVersion)
           
 
Methods inherited from class net.jot.persistance.JOTModel
createTable, delete, deleteTable, getFieldValue, getFieldValues, getId, getMapping, getQueryImplClass, initQueryImplClass, isNew, save, setId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

firstName

public java.lang.String firstName

lastName

public java.lang.String lastName

age

public int age
Constructor Detail

DBUser

public DBUser()
Method Detail

defineStorage

public java.lang.String defineStorage()
Description copied from class: JOTModel
Returns the "storage" to be used by this Model. default is to return JOTModel.DEFAULT_STORAGE (to use the "default" storage).

Specified by:
defineStorage in class JOTModel

defineVersion

protected int defineVersion()

customize

public void customize(JOTModelMapping mapping)
Description copied from class: JOTModel
Implements the customization (User defined tables modifications, ie: fields mappings, etc ...)

Specified by:
customize in class JOTModel

upgradeTable

public void upgradeTable(int fromVersion)

resetTable

public void resetTable()
                throws java.lang.Exception
Throws:
java.lang.Exception

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

upgrade

protected void upgrade(int fromVersion,
                       JOTDBUpgrader upgrader)
                throws java.lang.Exception
Throws:
java.lang.Exception