|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.ao.Common
public final class Common
WARNING: Not part of the public API. This class is public only to allow its use within other packages in the ActiveObjects library.
| Constructor Summary | |
|---|---|
Common()
|
|
| Method Summary | ||
|---|---|---|
static void |
closeQuietly(java.sql.Connection connection)
Closes the Connection in a null safe manner and quietly, i.e without throwing nor logging
any exception |
|
static void |
closeQuietly(java.sql.ResultSet resultSet)
Closes the ResultSet in a null safe manner and quietly, i.e without throwing nor logging
any exception |
|
static void |
closeQuietly(java.sql.Statement statement)
Closes the Statement in a null safe manner and quietly, i.e without throwing nor logging
any exception |
|
static java.lang.String |
convertDowncaseName(java.lang.String name)
|
|
static java.lang.String |
convertSimpleClassName(java.lang.String name)
|
|
static
|
createPeer(EntityManager manager,
java.lang.Class<T> type,
K key)
|
|
static java.lang.reflect.Method |
findCounterpart(FieldNameConverter converter,
java.lang.reflect.Method method)
Finds the corresponding method in an accessor/mutator pair based on the given method (or null if no corresponding method). |
|
static boolean |
fuzzyCompare(java.lang.Object a,
java.lang.Object b)
|
|
static boolean |
fuzzyTypeCompare(int typeA,
int typeB)
|
|
static AnnotationDelegate |
getAnnotationDelegate(FieldNameConverter converter,
java.lang.reflect.Method method)
Note: this method leads to the creation and quick discard of large numbers of AnnotationDelegate objects. |
|
static java.lang.Class<?> |
getAttributeTypeFromMethod(java.lang.reflect.Method method)
|
|
static java.lang.Class<?> |
getCallingClass(int depth)
|
|
static java.lang.String[] |
getMappingFields(FieldNameConverter converter,
java.lang.Class<? extends RawEntity<?>> from,
java.lang.Class<? extends RawEntity<?>> to)
|
|
static java.lang.String[] |
getPolymorphicFieldNames(FieldNameConverter converter,
java.lang.Class<? extends RawEntity<?>> from,
java.lang.Class<? extends RawEntity<?>> to)
|
|
static java.lang.reflect.Method |
getPrimaryKeyAccessor(java.lang.Class<? extends RawEntity<?>> type)
|
|
static
|
getPrimaryKeyClassType(java.lang.Class<? extends RawEntity<K>> type)
|
|
static java.lang.String |
getPrimaryKeyField(java.lang.Class<? extends RawEntity<?>> type,
FieldNameConverter converter)
|
|
static java.lang.reflect.Method |
getPrimaryKeyMethod(java.lang.Class<? extends RawEntity<?>> type)
|
|
static
|
getPrimaryKeyType(java.lang.Class<? extends RawEntity<K>> type)
|
|
static
|
getPrimaryKeyValue(RawEntity<K> entity)
|
|
static java.util.List<java.lang.String> |
getSearchableFields(EntityManager manager,
java.lang.Class<? extends RawEntity<?>> type)
|
|
static boolean |
interfaceInheritsFrom(java.lang.Class<?> type,
java.lang.Class<?> superType)
|
|
static boolean |
isAccessor(java.lang.reflect.Method method)
|
|
static boolean |
isMutator(java.lang.reflect.Method method)
|
|
static boolean |
typeInstanceOf(java.lang.Class<?> type,
java.lang.Class<?> otherType)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Common()
| Method Detail |
|---|
public static <T extends RawEntity<K>,K> T createPeer(EntityManager manager,
java.lang.Class<T> type,
K key)
public static java.lang.String convertSimpleClassName(java.lang.String name)
public static java.lang.String convertDowncaseName(java.lang.String name)
public static boolean interfaceInheritsFrom(java.lang.Class<?> type,
java.lang.Class<?> superType)
public static boolean typeInstanceOf(java.lang.Class<?> type,
java.lang.Class<?> otherType)
public static java.lang.String[] getMappingFields(FieldNameConverter converter,
java.lang.Class<? extends RawEntity<?>> from,
java.lang.Class<? extends RawEntity<?>> to)
public static java.lang.String[] getPolymorphicFieldNames(FieldNameConverter converter,
java.lang.Class<? extends RawEntity<?>> from,
java.lang.Class<? extends RawEntity<?>> to)
public static AnnotationDelegate getAnnotationDelegate(FieldNameConverter converter,
java.lang.reflect.Method method)
AnnotationDelegate objects. Need to
do some research to determine whether or not this is actually
a problem.
public static java.lang.reflect.Method findCounterpart(FieldNameConverter converter,
java.lang.reflect.Method method)
null if no corresponding method).
converter - TODOpublic static boolean isAccessor(java.lang.reflect.Method method)
public static boolean isMutator(java.lang.reflect.Method method)
public static java.lang.Class<?> getAttributeTypeFromMethod(java.lang.reflect.Method method)
public static java.lang.Class<?> getCallingClass(int depth)
public static java.util.List<java.lang.String> getSearchableFields(EntityManager manager,
java.lang.Class<? extends RawEntity<?>> type)
public static java.lang.reflect.Method getPrimaryKeyAccessor(java.lang.Class<? extends RawEntity<?>> type)
public static java.lang.String getPrimaryKeyField(java.lang.Class<? extends RawEntity<?>> type,
FieldNameConverter converter)
public static java.lang.reflect.Method getPrimaryKeyMethod(java.lang.Class<? extends RawEntity<?>> type)
public static <K> DatabaseType<K> getPrimaryKeyType(java.lang.Class<? extends RawEntity<K>> type)
public static <K> java.lang.Class<K> getPrimaryKeyClassType(java.lang.Class<? extends RawEntity<K>> type)
public static <K> K getPrimaryKeyValue(RawEntity<K> entity)
public static boolean fuzzyCompare(java.lang.Object a,
java.lang.Object b)
public static boolean fuzzyTypeCompare(int typeA,
int typeB)
public static void closeQuietly(java.sql.ResultSet resultSet)
ResultSet in a null safe manner and quietly, i.e without throwing nor logging
any exception
resultSet - the result set to closepublic static void closeQuietly(java.sql.Statement statement)
Statement in a null safe manner and quietly, i.e without throwing nor logging
any exception
statement - the statement to closepublic static void closeQuietly(java.sql.Connection connection)
Connection in a null safe manner and quietly, i.e without throwing nor logging
any exception
connection - the connection to close, can be null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||