Package net.ontopia.persistence.proxy
Class FieldUtils
java.lang.Object
net.ontopia.persistence.proxy.FieldUtils
INTERNAL: Class containing utility methods for processing
descriptor information.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidaccumulateImplementedInterfaces(Class<?> klass, Set<Class<?>> result) INTERNAL: Accumulates the interfaces implemented by this class and its superclasses.static voidaddColumns(FieldInfoIF[] fields, Collection<String> columns) static voidaddColumns(FieldInfoIF field, Collection<String> columns) static FieldInfoIF[]filterAggregate(FieldInfoIF[] finfos) INTERNAL: Filters out all but the aggregate field infos.static FieldDescriptor[]filterByCardinality(FieldDescriptor[] fdescs, int cardinality) INTERNAL: Filters the field descriptors by cardinality.static FieldInfoIF[]filterByCardinality(FieldInfoIF[] finfos, int cardinality) INTERNAL: Filters the field infos by cardinality.static FieldDescriptor[]filterByTable(FieldDescriptor[] fdescs, String table) INTERNAL: Returns the field descriptors that are stored in the specified table.static intgetColumnCount(FieldInfoIF[] fields) INTERNAL: Returns the number of columns that the fields span.static int[]getColumnOffsets(FieldHandlerIF[] fhandlers, int start) INTERNAL: Utility method that creates an int array containing the result set index for which the field handler should start reading.static String[]getColumns(FieldInfoIF[] fields) INTERNAL: Returns the names of the value columns that the fields span.static String[]getFieldNames(FieldDescriptor[] fields) INTERNAL: Utility method that extracts the field names of an array of field descriptors.static MethodgetGetterMethod(FieldDescriptor fdesc) INTERNAL: Returns the getter methods for the given field descriptor.static Class[]getImplementedInterfaces(Class<?> klass) INTERNAL: Returns all interfaces implemented by this class and its superclasses.static Class<?>getPrimitiveClass(Class<?> klass) INTERNAL: Returns the primitive class for the specified primitive wrapper class.static int[]getResultSetOffsets(FieldHandlerIF[] fhandlers) INTERNAL: Utility method that creates an int array containing the result set index for which the field handler should start reading.static MethodgetSetterMethod(FieldDescriptor fdesc) INTERNAL: Returns the setter methods for the given field descriptor.static String[]getTables(FieldInfoIF[] fields) INTERNAL: Returns an array containing the tables in which the fields are stored.static FieldInfoIF[]joinFieldInfos(FieldInfoIF[] a, FieldInfoIF[] b) INTERNAL: Joins the two FieldInfoIF arrays by producing a new composite string array.static String[]joinStrings(String[] a, String[] b) INTERNAL: Joins the two String arrays by producing a new composite string array.static FieldDescriptor[]INTERNAL: Utility method that converts a collection of field descriptors to an array of field descriptors.static FieldInfoIF[]toFieldInfoArray(Collection<FieldInfoIF> finfos) INTERNAL: Utility method that converts a collection of field infos to an array of field infos.static String[]toStringArray(Collection<String> strings) INTERNAL: Utility method that converts a collection of strings to an array of strings.
-
Constructor Details
-
FieldUtils
public FieldUtils()
-
-
Method Details
-
getTables
INTERNAL: Returns an array containing the tables in which the fields are stored. -
getColumns
INTERNAL: Returns the names of the value columns that the fields span. -
addColumns
-
addColumns
-
getColumnCount
INTERNAL: Returns the number of columns that the fields span. -
getColumnOffsets
INTERNAL: Utility method that creates an int array containing the result set index for which the field handler should start reading. Note that result set indexes are 1-indexed. -
getResultSetOffsets
INTERNAL: Utility method that creates an int array containing the result set index for which the field handler should start reading. Note that result set indexes are 1-indexed. -
filterByCardinality
INTERNAL: Filters the field descriptors by cardinality. -
filterByCardinality
INTERNAL: Filters the field infos by cardinality. -
filterAggregate
INTERNAL: Filters out all but the aggregate field infos. -
filterByTable
INTERNAL: Returns the field descriptors that are stored in the specified table. -
getGetterMethod
INTERNAL: Returns the getter methods for the given field descriptor. This method uses reflection to locate the method.- Throws:
Exception
-
getSetterMethod
INTERNAL: Returns the setter methods for the given field descriptor. This method uses reflection to locate the method.- Throws:
Exception
-
getPrimitiveClass
INTERNAL: Returns the primitive class for the specified primitive wrapper class. -
getImplementedInterfaces
INTERNAL: Returns all interfaces implemented by this class and its superclasses. -
accumulateImplementedInterfaces
INTERNAL: Accumulates the interfaces implemented by this class and its superclasses. All recognized interfaces are added to the result argument collection. -
joinStrings
INTERNAL: Joins the two String arrays by producing a new composite string array. -
joinFieldInfos
INTERNAL: Joins the two FieldInfoIF arrays by producing a new composite string array. -
toStringArray
INTERNAL: Utility method that converts a collection of strings to an array of strings. -
toFieldDescriptorArray
INTERNAL: Utility method that converts a collection of field descriptors to an array of field descriptors. -
toFieldInfoArray
INTERNAL: Utility method that converts a collection of field infos to an array of field infos. -
getFieldNames
INTERNAL: Utility method that extracts the field names of an array of field descriptors.
-