API Overview API Index Package Overview Direct link to this page
JavaOnTracks 0.1.2
  net.jot.persistance. JOTModelMapping View Source
Author(s)
tcolar
Since
Version
Serial
Hierarchy
 Object
      JOTModelMapping
Implements
Subclasses
Description
public class JOTModelMapping
Handles the mapping of a DB representaion (java object) to a DB table
See also:   
Constructors
public JOTModelMapping ()
Methods
Hide/Show inherited methods
publicstatic String createCleanTableName (String name)
  Create a clean SQL table name from a real name (typically model class name)
public void defineFieldDBName (String field, String name)
public void defineFieldMaxlength (String field, int value)
public void defineFieldMaxValue (String field, int value)
public void defineFieldMinlength (String field, int value)
public void defineFieldMinValue (String field, int value)
public void defineFieldSize (String field, int value)
public void defineFieldsToIgnore (String ignore)
public void defineFieldType (String field, String type)
public void defineTableName (String tableName)
  will convert the name to db friendly format if needed
publicstatic void deleteMetaFile (JOTModelMapping mapping)
public int getDataSize ()
  Returns the size(bytes) of a "row" of data.
public String getDBName ()
public Hashtable getFields ()
public int getFieldSize (JOTDBField field)
public String getIgnoredFields ()
public Vector getIndexes ()
public String getInsertFields ()
public Hashtable getMappedFields ()
protected String getMeta ()
  Returns the Metadata respresentation of the table columns ie: "id":int4, "name":varchar(100) ....
public String getQueryClassName ()
public String getStorageName ()
  Storage name is the name of the storage definition can be different than the db name defined in the prop file itself.
public String getTableName ()
publicstaticsynchronized JOTModelMeta readMetaFile (JOTModelMapping mapping) throws Exception
public void requestIndex (String column)
public void setFields (Hashtable fields)
public void setIgnoredFields (String ignoredFields)
public void setMappedFields (Hashtable mappedFields)
public void setQueryClassName (String className)
public void setStorageName (String storageName)
public void setTableName (String tableName)
publicstaticsynchronized void writeMetaFile (JOTModelMapping mapping) throws Exception
  Writes the current mapping (table metadata) to the metadata file (.jotmeta)
Fields
Hide/Show inherited fields
public boolean createMissingTables
publicfinalstatic String META_FILE_EXTENSION = ".jotmeta"
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.5     ©Thibaut Colar