|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.groiss.store.StoreUtil
public class StoreUtil
Utilities for stores
| Constructor Summary | |
|---|---|
StoreUtil()
|
|
| Method Summary | |
|---|---|
static void |
addEventHandler(PersistentEventHandler h,
java.lang.Class[] classes)
|
static void |
cleanDbFieldV()
|
static int |
dbAttrPos(Persistent o,
java.lang.String fieldname)
|
static java.lang.String |
dbAttrs(Persistent o)
|
static java.lang.String |
dbAttrs(Persistent o,
java.lang.String prefix)
|
static int |
dbAttrsCount(Persistent o)
|
static java.util.Vector |
dbFields(Persistent o)
Returns the fields of Object which have corresponding fields in the database. |
static java.util.Vector |
dbMultiValuedFields(Persistent o)
Returns the multivalued fields (Vectors and Hashtables) of Object which have corresponding fields in the database. |
static boolean |
existsTable(java.lang.String tablename)
Returns true if the passed table exists in the current db-schema. |
static java.math.BigDecimal |
getBigDecimal(java.sql.ResultSet rs,
int columnIndex)
|
static java.math.BigDecimal |
getBigDecimal(java.sql.ResultSet rs,
java.lang.String columnName)
|
static java.util.Date |
getDate(java.sql.ResultSet rs,
int columnIndex)
|
static java.util.Date |
getDate(java.sql.ResultSet rs,
java.lang.String columnName)
|
static java.util.List |
getEventHandlers(java.lang.Class c)
|
static java.lang.reflect.Field |
getField(Persistent o,
java.lang.String fieldname)
|
static java.lang.Object |
getFromRS(java.sql.ResultSet rs,
int sqlType,
int i)
|
static java.lang.Object |
getFromRS(java.sql.ResultSet rs,
java.sql.ResultSetMetaData metaData,
int i)
|
static boolean |
hasClassAttribute(java.lang.Class c)
|
static void |
removeEventHandler(PersistentEventHandler peh)
|
static void |
setBigDecimal(java.sql.PreparedStatement stmt,
int pos,
java.math.BigDecimal value)
|
static void |
setBindVars(java.sql.PreparedStatement stmt,
java.lang.Object[] bindVars)
Set the bind variables of a prepeared statement based on an object array. |
static void |
setFromDB(Persistent o,
java.sql.ResultSet rs)
Deprecated. |
static void |
setFromDB(Persistent o,
java.sql.ResultSet rs,
boolean addToCache)
Deprecated. |
static void |
setFromRS(Persistent o,
java.sql.ResultSet rs)
Set the members of the persistent object to the corresponding values of the current row of the result set. |
static void |
setFromRS(Persistent o,
java.sql.ResultSet rs,
boolean addToCache)
Set the members of the persistent object to the corresponding values of the current row of the result set. |
static void |
setFromRSByName(Persistent o,
java.sql.ResultSet rs)
Set the members of the persistent object to the corresponding values of the current row of the result set. |
static void |
setFromRSByName(Persistent o,
java.sql.ResultSet rs,
boolean addToCache)
Set the members of the persistent object to the corresponding values of the current row of the result set. |
static void |
setValues(Persistent o,
java.util.Map req)
|
static void |
setValues(Persistent o,
java.util.Map req,
java.util.Map fieldmodes)
|
static java.lang.String |
toNative(java.lang.String arg)
|
static java.lang.String |
toNativeScript(java.lang.String arg)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StoreUtil()
| Method Detail |
|---|
public static java.util.Vector dbFields(Persistent o)
public static java.util.Vector dbMultiValuedFields(Persistent o)
public static void cleanDbFieldV()
public static java.lang.String dbAttrs(Persistent o,
java.lang.String prefix)
public static int dbAttrsCount(Persistent o)
public static java.lang.String dbAttrs(Persistent o)
public static boolean hasClassAttribute(java.lang.Class c)
public static int dbAttrPos(Persistent o,
java.lang.String fieldname)
public static void setValues(Persistent o,
java.util.Map req)
throws ApplicationException
ApplicationException
public static void setValues(Persistent o,
java.util.Map req,
java.util.Map fieldmodes)
throws ApplicationException
ApplicationException
public static void setFromDB(Persistent o,
java.sql.ResultSet rs)
throws java.lang.Exception
o - The persistent objectrs - the ResultSet
java.lang.Exception
public static void setFromDB(Persistent o,
java.sql.ResultSet rs,
boolean addToCache)
throws java.lang.Exception
o - The persistent objectrs - the ResultSetaddToCache - if true, the object is added to the Thread-Cache.
java.lang.Exception
public static void setFromRSByName(Persistent o,
java.sql.ResultSet rs)
throws java.lang.Exception
o - The persistent objectrs - the ResultSet
java.lang.Exception
public static void setFromRSByName(Persistent o,
java.sql.ResultSet rs,
boolean addToCache)
throws java.lang.Exception
o - The persistent objectrs - the ResultSetaddToCache - if true, the object is added to the Thread-Cache.
java.lang.Exception
public static void setFromRS(Persistent o,
java.sql.ResultSet rs)
throws java.lang.Exception
o - The persistent objectrs - the ResultSet
java.lang.Exception
public static void setFromRS(Persistent o,
java.sql.ResultSet rs,
boolean addToCache)
throws java.lang.Exception
o - The persistent objectrs - the ResultSetaddToCache - if true, the object is added to the Thread-Cache.
java.lang.Exception
public static java.lang.Object getFromRS(java.sql.ResultSet rs,
java.sql.ResultSetMetaData metaData,
int i)
throws java.lang.Exception
java.lang.Exception
public static java.lang.Object getFromRS(java.sql.ResultSet rs,
int sqlType,
int i)
throws java.lang.Exception
java.lang.Exception
public static java.lang.reflect.Field getField(Persistent o,
java.lang.String fieldname)
public static java.lang.String toNativeScript(java.lang.String arg)
public static java.lang.String toNative(java.lang.String arg)
public static void addEventHandler(PersistentEventHandler h,
java.lang.Class[] classes)
public static void removeEventHandler(PersistentEventHandler peh)
public static java.util.List getEventHandlers(java.lang.Class c)
public static java.util.Date getDate(java.sql.ResultSet rs,
java.lang.String columnName)
throws java.sql.SQLException
java.sql.SQLException
public static java.util.Date getDate(java.sql.ResultSet rs,
int columnIndex)
throws java.sql.SQLException
java.sql.SQLException
public static java.math.BigDecimal getBigDecimal(java.sql.ResultSet rs,
java.lang.String columnName)
throws java.sql.SQLException
java.sql.SQLException
public static java.math.BigDecimal getBigDecimal(java.sql.ResultSet rs,
int columnIndex)
throws java.sql.SQLException
java.sql.SQLException
public static void setBigDecimal(java.sql.PreparedStatement stmt,
int pos,
java.math.BigDecimal value)
throws java.sql.SQLException
java.sql.SQLException
public static void setBindVars(java.sql.PreparedStatement stmt,
java.lang.Object[] bindVars)
stmt - the prepared statementbindVars - the array ob bind variables
public static boolean existsTable(java.lang.String tablename)
throws java.lang.Exception
tablename - the name of the table to be checked.
java.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||