|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ujoframework.orm.OrmHandler
public class OrmHandler
The basic class for an ORM support.
| Constructor Summary | |
|---|---|
OrmHandler()
The (Sigleton ?) |
|
| Method Summary | ||
|---|---|---|
void |
addProperty(UjoProperty property,
MetaRelation2Many newColumn)
Map a property to the table |
|
void |
config(MetaParams params)
Save the ORM parameters. |
|
void |
config(MetaRoot config)
Save the ORM configuration include parameters (if the parameters are not null). |
|
boolean |
config(java.lang.String url)
Load parameters from an external XML file. |
|
boolean |
config(java.net.URL url,
boolean throwsException)
Load parameters from an external XML file. |
|
Session |
createSession()
Create new session TODO: getDefaultSession from a map by key. |
|
MetaRelation2Many |
findColumnModel(UjoProperty pathProperty)
Find a Relation/Column model of the paramemeter property. |
|
MetaTable |
findTableModel(java.lang.Class<? extends OrmUjo> dbClass)
Find a table model by the dbClass. |
|
static OrmHandler |
getInstance()
A candidate to removing |
|
MetaParams |
getParameters()
Returns parameters |
|
Session |
getSession()
Get Session TODO: getDefaultSession from a map by key. |
|
boolean |
isPersistent(UjoProperty property)
Is the parameter a persistent property? |
|
|
loadDatabase(java.lang.Class<UJO>... databaseModels)
Load a meta-data and create database tables |
|
|
loadDatabase(java.lang.Class<UJO> databaseModel)
Load a meta-data and create database tables |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OrmHandler()
| Method Detail |
|---|
public static OrmHandler getInstance()
public Session getSession()
public Session createSession()
public boolean config(java.lang.String url)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public void config(MetaParams params)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public void config(MetaRoot config)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public boolean config(java.net.URL url,
boolean throwsException)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic boolean isPersistent(UjoProperty property)
public final <UJO extends OrmUjo> void loadDatabase(java.lang.Class<UJO> databaseModel)
public <UJO extends OrmUjo> void loadDatabase(java.lang.Class<UJO>... databaseModels)
public void addProperty(UjoProperty property,
MetaRelation2Many newColumn)
public MetaRelation2Many findColumnModel(UjoProperty pathProperty)
pathProperty - Parameter can be type of Property of PathProperty (direct or indirect);
public MetaTable findTableModel(java.lang.Class<? extends OrmUjo> dbClass)
public MetaParams getParameters()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||