org.dasein.persist.jdbc
Class AutomatedSql
java.lang.Object
org.dasein.persist.Execution
org.dasein.persist.jdbc.AutomatedSql
- Direct Known Subclasses:
- Counter, Creator, Deleter, Loader, Updater
public class AutomatedSql
- extends Execution
|
Method Summary |
protected List<String> |
getColumns()
|
protected List<AutomatedSql.Criterion> |
getCriteria()
|
protected PersistentCache.EntityJoin |
getEntityJoin(Class<? extends org.dasein.util.CachedItem> forClass)
|
AutomatedSql.Join |
getJoin()
|
protected Collection<Class<? extends org.dasein.util.CachedItem>> |
getJoinEntities()
|
protected String |
getJoinTable(Class<?> c1,
Class<?> c2)
|
protected String |
getSqlName(Class<?> cls)
|
protected String |
getSqlName(String nom)
|
protected String |
getSqlNameForClassName(String cname)
|
protected String |
getTableName()
|
Class<?> |
getTarget()
|
AutomatedSql.TranslationMethod |
getTranslationMethod()
|
protected Collection<String> |
getTranslators()
|
protected Map<String,Class<?>> |
getTypes()
|
protected void |
init()
|
boolean |
isTranslating()
|
Map<String,org.dasein.util.Translator<String>> |
loadStringTranslations(Transaction xaction,
Class cls,
String id)
|
protected void |
parseFields(Class<?> cls,
Collection<String> cols,
Map<String,Class<?>> t,
Collection<String> trans)
|
void |
prepare(String col,
int i,
Object ob)
|
void |
prepare(String col,
int i,
Object ob,
Class<?> t)
|
void |
prepareFor(String col,
int i,
Object ob,
Class<?> owner)
|
protected void |
prepareFor(String col,
int i,
Object ob,
String owner)
|
void |
removeStringTranslations(Transaction xaction,
Class cls,
String id)
|
void |
saveStringTranslation(Transaction xaction,
String cname,
String id,
String attr,
org.dasein.util.Translator<String> t)
|
protected void |
setCriteria(AutomatedSql.Criterion... params)
|
protected void |
setCriteria(AutomatedSql.Join j,
AutomatedSql.Criterion... params)
|
protected void |
setCriteria(AutomatedSql.Join j,
String... params)
|
protected void |
setCriteria(String... params)
|
void |
setCustomTranslating()
|
protected void |
setEntityJoins(Map<Class<? extends org.dasein.util.CachedItem>,PersistentCache.EntityJoin> joins)
|
protected void |
setTarget(Class<?> cls)
|
protected void |
setTarget(String cname)
|
protected void |
setTarget(String tname,
Class<?> cls)
|
protected void |
setTranslating(boolean t)
|
protected void |
setTranslating(PersistentFactory<?> f)
|
| Methods inherited from class org.dasein.persist.Execution |
close, execute, getConnection, getDataSource, getDataSourceName, getDataSourceName, getIdentifier, getIdentifier, getInstance, getQuotes, getState, getStatement, getStatement, getStatement, isReadOnly, isUpperCase, run, run, saveStringTranslation, setData, setDsn |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AutomatedSql
public AutomatedSql()
init
protected void init()
getColumns
protected List<String> getColumns()
getCriteria
protected List<AutomatedSql.Criterion> getCriteria()
getEntityJoin
protected PersistentCache.EntityJoin getEntityJoin(Class<? extends org.dasein.util.CachedItem> forClass)
getJoinEntities
protected Collection<Class<? extends org.dasein.util.CachedItem>> getJoinEntities()
getJoin
public AutomatedSql.Join getJoin()
getJoinTable
protected String getJoinTable(Class<?> c1,
Class<?> c2)
getSqlNameForClassName
protected String getSqlNameForClassName(String cname)
getSqlName
protected String getSqlName(Class<?> cls)
getSqlName
protected String getSqlName(String nom)
getTableName
protected String getTableName()
getTarget
public Class<?> getTarget()
getTranslationMethod
public AutomatedSql.TranslationMethod getTranslationMethod()
getTranslators
protected Collection<String> getTranslators()
getTypes
protected Map<String,Class<?>> getTypes()
isTranslating
public boolean isTranslating()
parseFields
protected void parseFields(Class<?> cls,
Collection<String> cols,
Map<String,Class<?>> t,
Collection<String> trans)
prepare
public void prepare(String col,
int i,
Object ob)
throws SQLException
- Throws:
SQLException
prepare
public void prepare(String col,
int i,
Object ob,
Class<?> t)
throws SQLException
- Throws:
SQLException
prepareFor
protected void prepareFor(String col,
int i,
Object ob,
String owner)
throws SQLException
- Throws:
SQLException
prepareFor
public void prepareFor(String col,
int i,
Object ob,
Class<?> owner)
throws SQLException
- Throws:
SQLException
setCriteria
protected void setCriteria(String... params)
setCriteria
protected void setCriteria(AutomatedSql.Criterion... params)
setCriteria
protected void setCriteria(AutomatedSql.Join j,
String... params)
setCriteria
protected void setCriteria(AutomatedSql.Join j,
AutomatedSql.Criterion... params)
setCustomTranslating
public void setCustomTranslating()
setTarget
protected void setTarget(String cname)
setTarget
protected void setTarget(Class<?> cls)
setTarget
protected void setTarget(String tname,
Class<?> cls)
setTranslating
protected void setTranslating(boolean t)
setTranslating
protected void setTranslating(PersistentFactory<?> f)
loadStringTranslations
public Map<String,org.dasein.util.Translator<String>> loadStringTranslations(Transaction xaction,
Class cls,
String id)
throws PersistenceException,
SQLException
- Overrides:
loadStringTranslations in class Execution
- Throws:
PersistenceException
SQLException
removeStringTranslations
public void removeStringTranslations(Transaction xaction,
Class cls,
String id)
throws PersistenceException,
SQLException
- Overrides:
removeStringTranslations in class Execution
- Throws:
PersistenceException
SQLException
saveStringTranslation
public void saveStringTranslation(Transaction xaction,
String cname,
String id,
String attr,
org.dasein.util.Translator<String> t)
throws SQLException,
PersistenceException
- Overrides:
saveStringTranslation in class Execution
- Throws:
SQLException
PersistenceException
setEntityJoins
protected void setEntityJoins(Map<Class<? extends org.dasein.util.CachedItem>,PersistentCache.EntityJoin> joins)
Copyright © 2011 enStratus Networks LLC. All Rights Reserved.