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
See DIRECT subclasses
Quick Links:
Constructors
Methods
Fields
NestedClasses
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
public
static
String
createCleanTableName
(
String
name)
Create a clean SQL table name from a real name (typically model class name)
Create a clean SQL table name from a real name (typically model class name)
Returns:
Parameters:
-
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
will convert the name to db friendly format if needed
Parameters:
-
tableName
-
public
static
void
deleteMetaFile
(
JOTModelMapping
mapping)
public
int
getDataSize
()
Returns the size(bytes) of a "row" of data.
Returns the size(bytes) of a "row" of data.
Returns:
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) ....
Returns the Metadata respresentation of the table columns
ie: "id":int4, "name":varchar(100) ....
Returns:
Parameters:
-
mapping
-
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.
Storage name is the name of the storage definition
can be different than the db name defined in the prop file itself.
Returns:
public
String
getTableName
()
public
static
synchronized
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)
public
static
synchronized
void
writeMetaFile
(
JOTModelMapping
mapping) throws
Exception
Writes the current mapping (table metadata) to the metadata file (.jotmeta)
Writes the current mapping (table metadata) to the metadata file (.jotmeta)
Parameters:
-
mapping
-
Throws:
-
java.lang.Exception
-
Fields
Hide/Show inherited fields
public
boolean
createMissingTables
public
final
static
String
META_FILE_EXTENSION
= ".jotmeta"
Nested Classes
Generated By:
JavaOnTracks Doclet
0.1.5 ©Thibaut Colar