com.scooterframework.orm.activerecord
Class ActiveRecordClass

java.lang.Object
  extended by com.scooterframework.orm.activerecord.ActiveRecordClass
Direct Known Subclasses:
ActiveRecord

public abstract class ActiveRecordClass
extends java.lang.Object

ActiveRecord defines static operations that each subclass of the ActiveRecord class must implement. Scooter automatically add this method into the compiled model (subclass of ActiveRecord) class in a web container.


Constructor Summary
ActiveRecordClass()
           
 
Method Summary
static java.lang.Object average(java.lang.String field)
          Calculates average of a field.
static java.lang.Object average(java.lang.String field, java.lang.String options)
          Calculates average of a field.
static java.lang.Object calculate(java.lang.String function, java.lang.String field, java.lang.String options)
          Calculates by a function on a field.
static java.util.List<java.lang.String> columnNames()
          Returns a list of column names.
static java.util.List<ColumnInfo> columns()
          Returns a list of ColumnInfo instances.
static java.lang.String connectionName()
          Returns the connection name of associated with the record type.
static long count()
          Counts number of records.
static long count(java.lang.String field)
          Counts number of records for a field.
static long count(java.lang.String field, java.lang.String options)
          Counts number of records for a field.
static int deleteAll(java.util.Map<java.lang.String,java.lang.Object> conditions)
          Deletes all the records that satisfy the conditions.
static int deleteAll(java.lang.String conditionsSQL)
          Deletes all the records that satisfy the conditions.
static int deleteAll(java.lang.String conditionsSQL, java.util.Map<java.lang.String,java.lang.Object> conditionsSQLData)
          Deletes all the records that satisfy the conditions.
static int deleteById(long id)
          Deletes the record with the given id, assuming ID is the primary key column.
static int deleteById(java.lang.Object id)
          Deletes the record with the given id, assuming ID is the primary key column.
static int deleteByPK(java.lang.String pkString)
          Deletes the record with the given primary key string.
static int deleteByPrimaryKeyMap(java.util.Map<java.lang.String,java.lang.Object> inputs)
          Deletes the record with the given data map containing primary keys.
static int deleteBySQL(java.lang.String sql)
          Deletes all the records that satisfy the SQL statement.
static int deleteBySQL(java.lang.String sql, java.util.Map<java.lang.String,java.lang.Object> inputs)
          Deletes all the records that satisfy the SQL statement.
static int deleteBySQLKey(java.lang.String sqlKey)
          Deletes all the records that satisfy the SQL specified by the sqlKey.
static int deleteBySQLKey(java.lang.String sqlKey, java.util.Map<java.lang.String,java.lang.Object> inputs)
          Deletes all the records that satisfy the SQL specified by the sqlKey.
static java.util.List<ActiveRecord> findAll()
          Finds all the records of a table.
static java.util.List<ActiveRecord> findAllBy(java.lang.String columns, java.lang.Object[] values)
          Finds all the records that satisfy the conditions.
static java.util.List<ActiveRecord> findAllBy(java.lang.String columns, java.lang.Object[] values, java.util.Map<java.lang.String,java.lang.String> options)
          Finds all the records that satisfy the conditions.
static java.util.List<ActiveRecord> findAllBy(java.lang.String columns, java.lang.Object[] values, java.lang.String options)
          Finds all the records that satisfy the conditions.
static java.util.List<ActiveRecord> findAllBySQL(java.lang.String sql)
          Finds all the records that satisfy the SQL query.
static java.util.List<ActiveRecord> findAllBySQL(java.lang.String sql, java.util.Map<java.lang.String,java.lang.Object> inputs)
          Finds all the records that satisfy the SQL query.
static java.util.List<ActiveRecord> findAllBySQLKey(java.lang.String sqlKey)
          Finds all the records that satisfy the sql corresponding to the sql key.
static java.util.List<ActiveRecord> findAllBySQLKey(java.lang.String sqlKey, java.util.Map<java.lang.String,java.lang.Object> inputs)
          Finds all the records that satisfy the sql corresponding to the sql key.
static
<T extends ActiveRecord>
T
findById(long id)
          Finds the record with the given id, assuming ID is the primary key column.
static
<T extends ActiveRecord>
T
findById(java.lang.Object id)
          Finds the record with the given id, assuming ID is the primary key column.
static
<T extends ActiveRecord>
T
findByPK(java.lang.String pkString)
          Finds the record with the given pkString.
static
<T extends ActiveRecord>
T
findByRESTfulId(java.lang.String restfulId)
          Finds the record with the given restfulId.
static
<T extends ActiveRecord>
T
findFirst()
          Finds the first record of a table.
static
<T extends ActiveRecord>
T
findFirstBy(java.lang.String columns, java.lang.Object[] values)
          Finds the first record that satisfy the conditions.
static
<T extends ActiveRecord>
T
findLast()
          Finds the last record of a table.
static
<T extends ActiveRecord>
T
findLastBy(java.lang.String columns, java.lang.Object[] values)
          Finds the last record that satisfy the conditions.
static QueryBuilder groupBy(java.lang.String groupBy)
          Setup group-by clause.
static QueryBuilder having(java.lang.String having)
          Setup having clause.
static
<T extends ActiveRecord>
T
homeInstance()
          Returns the home instance of the record type.
static QueryBuilder includes(java.lang.String includes)
          Setup associated models for eager loading.
static QueryBuilder includes(java.lang.String includes, boolean strict)
          Setup associated models for eager loading.
static QueryBuilder includes(java.lang.String includes, java.lang.String joinType)
          Setup associated models for eager loading.
static QueryBuilder limit(int limit)
          Setup limit for number of records per retrieval.
static java.lang.Object maximum(java.lang.String field)
          Calculates maximum of a field.
static java.lang.Object maximum(java.lang.String field, java.lang.String options)
          Calculates maximum of a field.
static java.lang.Object minium(java.lang.String field)
          Calculates minimum of a field.
static java.lang.Object minium(java.lang.String field, java.lang.String options)
          Calculates minimum of a field.
static
<T extends ActiveRecord>
T
newRecord()
          Creates a new instance.
static QueryBuilder offset(int offset)
          Setup number of records to skip.
static QueryBuilder orderBy(java.lang.String orderBy)
          Setup group-by clause.
static QueryBuilder page(int page)
          Setup current page number.
static java.util.List<java.lang.String> primaryKeyNames()
          Returns a list of primary key column names.
static java.util.List<java.lang.String> readOnlyColumnNames()
          Returns a list of read-only column names.
static RowInfo rowInfo()
          Returns the RowInfo of the record.
static java.lang.String simpleTableName()
          Returns the simple table name of associated with the record type.
static java.lang.Object sum(java.lang.String field)
          Calculates sum of a field.
static java.lang.Object sum(java.lang.String field, java.lang.String options)
          Calculates sum of a field.
static java.lang.String tableName()
          Returns the table name of associated with the record type.
static int updateAll(java.util.Map<java.lang.String,java.lang.Object> fieldData)
          Updates all the records of a table.
static int updateAll(java.util.Map<java.lang.String,java.lang.Object> fieldData, java.lang.String conditionsSQL)
          Updates all the records that satisfy the conditions.
static int updateAll(java.util.Map<java.lang.String,java.lang.Object> fieldData, java.lang.String conditionsSQL, java.util.Map<java.lang.String,java.lang.Object> conditionsSQLData)
          Updates all the records that satisfy the conditions.
static int updateBySQL(java.lang.String sql)
          Updates all the records that satisfy the SQL statement.
static int updateBySQL(java.lang.String sql, java.util.Map<java.lang.String,java.lang.Object> inputs)
          Updates all the records that satisfy the SQL statement.
static int updateBySQLKey(java.lang.String sqlKey)
          Updates all the records that satisfy the SQL specified by sqlKey .
static int updateBySQLKey(java.lang.String sqlKey, java.util.Map<java.lang.String,java.lang.Object> inputs)
          Updates all the records that satisfy the SQL specified by sqlKey .
static QueryBuilder where(java.lang.String conditionsSQL)
          Setup where clause.
static QueryBuilder where(java.lang.String conditionsSQL, java.util.Map<java.lang.String,java.lang.Object> conditionsSQLDataMap)
          Setup where clause.
static QueryBuilder where(java.lang.String conditionsSQL, java.lang.Object[] conditionsSQLData)
          Setup where clause.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActiveRecordClass

public ActiveRecordClass()
Method Detail

newRecord

public static <T extends ActiveRecord> T newRecord()
Creates a new instance.

The created instance is based on meta info for table as returned by ActiveRecord.getTableName() and database connection name as returned by ActiveRecord.getConnectionName().

See ActiveRecord.ActiveRecord(String connectionName, String tableName).


where

public static QueryBuilder where(java.lang.String conditionsSQL)

Setup where clause.

Parameters:
conditionsSQL - a valid SQL query where clause string
Returns:
current QueryBuilder instance

where

public static QueryBuilder where(java.lang.String conditionsSQL,
                                 java.lang.Object[] conditionsSQLData)

Setup where clause.

Parameters:
conditionsSQL - a valid SQL query where clause string
conditionsSQLData - an array of data for the conditionsSQL string
Returns:
current QueryBuilder instance

where

public static QueryBuilder where(java.lang.String conditionsSQL,
                                 java.util.Map<java.lang.String,java.lang.Object> conditionsSQLDataMap)

Setup where clause.

Parameters:
conditionsSQL - a valid SQL query where clause string
conditionsSQLDataMap - a map of data for the keys in the conditionsSQL string
Returns:
current QueryBuilder instance

includes

public static QueryBuilder includes(java.lang.String includes)

Setup associated models for eager loading.

Parameters:
includes - a string of associated models
Returns:
current QueryBuilder instance

includes

public static QueryBuilder includes(java.lang.String includes,
                                    java.lang.String joinType)

Setup associated models for eager loading.

Parameters:
includes - a string of associated models
joinType - type of join
Returns:
current QueryBuilder instance

includes

public static QueryBuilder includes(java.lang.String includes,
                                    boolean strict)

Setup associated models for eager loading.

If strict is true, then child records can only be accessed through their parent.

Parameters:
includes - a string of associated models
strict - true if strict
Returns:
current QueryBuilder instance

groupBy

public static QueryBuilder groupBy(java.lang.String groupBy)

Setup group-by clause.

Parameters:
groupBy - a valid SQL query group-by clause string
Returns:
current QueryBuilder instance

having

public static QueryBuilder having(java.lang.String having)

Setup having clause.

Parameters:
having - a valid SQL query having clause string
Returns:
current QueryBuilder instance

orderBy

public static QueryBuilder orderBy(java.lang.String orderBy)

Setup group-by clause.

Parameters:
orderBy - a valid SQL query order-by clause string
Returns:
current QueryBuilder instance

limit

public static QueryBuilder limit(int limit)

Setup limit for number of records per retrieval.

Parameters:
limit - number of records for each retrieval
Returns:
current QueryBuilder instance

offset

public static QueryBuilder offset(int offset)

Setup number of records to skip.

Parameters:
offset - number of records to skip
Returns:
current QueryBuilder instance

page

public static QueryBuilder page(int page)

Setup current page number. All records in previous pages are skipped.

Parameters:
page - current page number
Returns:
current QueryBuilder instance

findById

public static <T extends ActiveRecord> T findById(long id)
Finds the record with the given id, assuming ID is the primary key column. If there is no column name like "ID", an exception will be thrown.

Parameters:
id - the id of the record
Returns:
the ActiveRecord associated with the id

findById

public static <T extends ActiveRecord> T findById(java.lang.Object id)
Finds the record with the given id, assuming ID is the primary key column. If there is no column name like "ID", an exception will be thrown.

Parameters:
id - the id of the record
Returns:
the ActiveRecord associated with the id

findByRESTfulId

public static <T extends ActiveRecord> T findByRESTfulId(java.lang.String restfulId)
Finds the record with the given restfulId. See ActiveRecord.getRestfulId() for definition of RESTfulId. If there is no primary key, a null record is returned.

Parameters:
restfulId - the RESTful id of the record
Returns:
the ActiveRecord associated with the restfulId

findByPK

public static <T extends ActiveRecord> T findByPK(java.lang.String pkString)
Finds the record with the given pkString. This method is the same as the findByRESTfulId method. See ActiveRecord.getRestfulId() for definition of RESTfulId which is the same as the primary key string. If there is no primary key, a null record is returned.

Parameters:
pkString - the primary key string of the record
Returns:
the ActiveRecord associated with the pkString

findAllBySQL

public static java.util.List<ActiveRecord> findAllBySQL(java.lang.String sql)

Finds all the records that satisfy the SQL query.

Parameters:
sql - a valid SQL query string
Returns:
a list of ActiveRecord objects

findAllBySQL

public static java.util.List<ActiveRecord> findAllBySQL(java.lang.String sql,
                                                        java.util.Map<java.lang.String,java.lang.Object> inputs)

Finds all the records that satisfy the SQL query.

Parameters:
sql - a valid SQL query string
inputs - a map of name and value pairs
Returns:
a list of ActiveRecord objects

findAllBySQLKey

public static java.util.List<ActiveRecord> findAllBySQLKey(java.lang.String sqlKey)

Finds all the records that satisfy the sql corresponding to the sql key.

Parameters:
sqlKey - a key to a sql string defined in sql.properties file
Returns:
a list of ActiveRecord objects

findAllBySQLKey

public static java.util.List<ActiveRecord> findAllBySQLKey(java.lang.String sqlKey,
                                                           java.util.Map<java.lang.String,java.lang.Object> inputs)

Finds all the records that satisfy the sql corresponding to the sql key.

Parameters:
sqlKey - a key to a sql string defined in sql.properties file
inputs - a map of name and value pairs
Returns:
a list of ActiveRecord objects

findFirstBy

public static <T extends ActiveRecord> T findFirstBy(java.lang.String columns,
                                                     java.lang.Object[] values)

Finds the first record that satisfy the conditions.

This is a dynamic finder method. See top of the ActiveRecord class for dynamic finder examples.

Parameters:
columns - a string of column names linked by "_and_".
values - an Object[] array
Returns:
ActiveRecord

findLastBy

public static <T extends ActiveRecord> T findLastBy(java.lang.String columns,
                                                    java.lang.Object[] values)

Finds the last record that satisfy the conditions.

This is a dynamic finder method. See top of the ActiveRecord class for dynamic finder examples.

Parameters:
columns - a string of column names linked by "_and_".
values - an Object[] array
Returns:
ActiveRecord

findAllBy

public static java.util.List<ActiveRecord> findAllBy(java.lang.String columns,
                                                     java.lang.Object[] values)

Finds all the records that satisfy the conditions.

This is a dynamic finder method. See top of the ActiveRecord class for dynamic finder examples.

Parameters:
columns - a string of column names linked by "_and_".
values - an Object[] array
Returns:
List of ActiveRecord objects

findAllBy

public static java.util.List<ActiveRecord> findAllBy(java.lang.String columns,
                                                     java.lang.Object[] values,
                                                     java.util.Map<java.lang.String,java.lang.String> options)

Finds all the records that satisfy the conditions.

This is a dynamic finder method. See top of the ActiveRecord class for dynamic finder examples.

Parameters:
columns - a string of column names linked by "_and_".
values - an Object[] array
options - a map of options
Returns:
List of ActiveRecord objects

findAllBy

public static java.util.List<ActiveRecord> findAllBy(java.lang.String columns,
                                                     java.lang.Object[] values,
                                                     java.lang.String options)

Finds all the records that satisfy the conditions.

This is a dynamic finder method. See top of the ActiveRecord class for dynamic finder examples.

Parameters:
columns - a string of column names linked by "_and_".
values - an Object[] array
options - a string of options
Returns:
List of ActiveRecord objects

findAll

public static java.util.List<ActiveRecord> findAll()

Finds all the records of a table.

Returns:
a list of ActiveRecord objects

findFirst

public static <T extends ActiveRecord> T findFirst()

Finds the first record of a table.

Returns:
the first ActiveRecord found

findLast

public static <T extends ActiveRecord> T findLast()

Finds the last record of a table.

Returns:
the last ActiveRecord found

updateBySQL

public static int updateBySQL(java.lang.String sql)
Updates all the records that satisfy the SQL statement.

Parameters:
sql - A valid SQL string
Returns:
int number of records updated

updateBySQL

public static int updateBySQL(java.lang.String sql,
                              java.util.Map<java.lang.String,java.lang.Object> inputs)
Updates all the records that satisfy the SQL statement.

Parameters:
sql - A valid SQL string
inputs - a map of name and value pairs
Returns:
int number of records updated

updateBySQLKey

public static int updateBySQLKey(java.lang.String sqlKey)
Updates all the records that satisfy the SQL specified by sqlKey .

Parameters:
sqlKey - a key to a SQL string.
Returns:
int number of records updated

updateBySQLKey

public static int updateBySQLKey(java.lang.String sqlKey,
                                 java.util.Map<java.lang.String,java.lang.Object> inputs)
Updates all the records that satisfy the SQL specified by sqlKey .

Parameters:
sqlKey - a key to a SQL string
inputs - a map of name and value pairs
Returns:
int number of records updated

updateAll

public static int updateAll(java.util.Map<java.lang.String,java.lang.Object> fieldData)

Updates all the records of a table.

This method sends a single SQL UPDATE statement to database. No callbacks are triggered. If callbacks are necessary for handling associations, use findAll method to retrieve a list of records and then call each record's update() method.

fieldData map is used to construct SET clause of the generated SQL. It consists of column name and its value pairs in the map. Primary key column and read-only columns are not updatable.

Parameters:
fieldData - a map of field name and its data to be set on any records
Returns:
int number of records updated

updateAll

public static int updateAll(java.util.Map<java.lang.String,java.lang.Object> fieldData,
                            java.lang.String conditionsSQL)

Updates all the records that satisfy the conditions.

See top of the ActiveRecord class for conditionsSQL examples.

This method sends a single SQL UPDATE statement to database. No callbacks are triggered. If callbacks are necessary for handling associations, use findAll method to retrieve a list of records and then call each record's update() method.

fieldData map is used to construct SET clause of the generated SQL. It consists of column name and its value pairs in the map. Primary key column and read-only columns are not updatable.

Parameters:
fieldData - a map of field name and its data to be set on any records that satisfy the conditions.
conditionsSQL - a SQL fragment string
Returns:
int number of records updated

updateAll

public static int updateAll(java.util.Map<java.lang.String,java.lang.Object> fieldData,
                            java.lang.String conditionsSQL,
                            java.util.Map<java.lang.String,java.lang.Object> conditionsSQLData)

Updates all the records that satisfy the conditions.

See top of the ActiveRecord class for conditionsSQL and conditionsSQLData examples.

This method sends a single SQL UPDATE statement to database. No callbacks are triggered. If callbacks are necessary for handling associations, use findAll method to retrieve a list of records and then call each record's update() method.

fieldData map is used to construct SET clause of the generated SQL. It consists of column name and its value pairs in the map. Primary key column and read-only columns are not updatable.

Parameters:
fieldData - a map of field name and its data to be set.
conditionsSQL - a SQL fragment string
conditionsSQLData - a data map for dynamic attributes in conditionsSQL
Returns:
int number of records updated

deleteById

public static int deleteById(long id)
Deletes the record with the given id, assuming ID is the primary key column. If there is no column name like "ID", an exception will be thrown.

Parameters:
id - key to the object with field name "ID"
Returns:
int number of records deleted

deleteById

public static int deleteById(java.lang.Object id)
Deletes the record with the given id, assuming ID is the primary key column. If there is no column name like "ID", an exception will be thrown.

Parameters:
id - key to the object with field name "ID"
Returns:
int number of records deleted

deleteByPK

public static int deleteByPK(java.lang.String pkString)
Deletes the record with the given primary key string. See ActiveRecord.getPK() for format of the primary key string.

Parameters:
pkString - primary key string
Returns:
int number of records deleted

deleteByPrimaryKeyMap

public static int deleteByPrimaryKeyMap(java.util.Map<java.lang.String,java.lang.Object> inputs)
Deletes the record with the given data map containing primary keys. If not all primary key columns have data, an exception will be thrown.

Parameters:
inputs - a map of name and value pairs
Returns:
int number of records deleted

deleteBySQL

public static int deleteBySQL(java.lang.String sql)
Deletes all the records that satisfy the SQL statement.

Parameters:
sql - a key to a SQL string
Returns:
int number of records deleted

deleteBySQL

public static int deleteBySQL(java.lang.String sql,
                              java.util.Map<java.lang.String,java.lang.Object> inputs)
Deletes all the records that satisfy the SQL statement. The inputs is a map of name and value pairs related to the SQL statement.

Parameters:
sql - a key to a SQL string
inputs - a map of name and value pairs
Returns:
int number of records deleted

deleteBySQLKey

public static int deleteBySQLKey(java.lang.String sqlKey)
Deletes all the records that satisfy the SQL specified by the sqlKey.

Parameters:
sqlKey - a key to a SQL string
Returns:
int number of records deleted

deleteBySQLKey

public static int deleteBySQLKey(java.lang.String sqlKey,
                                 java.util.Map<java.lang.String,java.lang.Object> inputs)
Deletes all the records that satisfy the SQL specified by the sqlKey. The inputs is a map of name and value pairs related to the SQL statement.

Parameters:
sqlKey - a key to a SQL string
inputs - a map of name and value pairs
Returns:
int number of records deleted

deleteAll

public static int deleteAll(java.util.Map<java.lang.String,java.lang.Object> conditions)

Deletes all the records that satisfy the conditions.

See top of the ActiveRecord class for conditions examples.

This method sends a single SQL DELETE statement to database. No callbacks are triggered. If callbacks are necessary for handling associations, use findAll method to retrieve a list of records and then call each record's delete() method.

Parameters:
conditions - a map of column name and value pairs
Returns:
int number of records deleted

deleteAll

public static int deleteAll(java.lang.String conditionsSQL)

Deletes all the records that satisfy the conditions.

See top of the ActiveRecord class for conditionsSQL examples.

This method sends a single SQL DELETE statement to database. No callbacks are triggered. If callbacks are necessary for handling associations, use findAll method to retrieve a list of records and then call each record's delete() method.

Parameters:
conditionsSQL - a SQL fragment string
Returns:
int number of records deleted

deleteAll

public static int deleteAll(java.lang.String conditionsSQL,
                            java.util.Map<java.lang.String,java.lang.Object> conditionsSQLData)

Deletes all the records that satisfy the conditions.

See top of the ActiveRecord class for conditionsSQL and conditionsSQLData examples.

This method sends a single SQL DELETE statement to database. No callbacks are triggered. If callbacks are necessary for handling associations, use findAll method to retrieve a list of records and then call each record's delete() method.

Parameters:
conditionsSQL - a SQL fragment string
conditionsSQLData - a data map for dynamic attributes in conditionsSQL
Returns:
int number of records deleted

count

public static long count()
Counts number of records.

Returns:
number of records.

count

public static long count(java.lang.String field)
Counts number of records for a field.

Parameters:
field - name of the field
Returns:
number of records.

count

public static long count(java.lang.String field,
                         java.lang.String options)
Counts number of records for a field.

Parameters:
field - name of the field
options - options for calculation
Returns:
number of records.

sum

public static java.lang.Object sum(java.lang.String field)
Calculates sum of a field.

Parameters:
field - the column name
Returns:
result of calculation

sum

public static java.lang.Object sum(java.lang.String field,
                                   java.lang.String options)
Calculates sum of a field.

Parameters:
field - the column name
options - options of calculation
Returns:
result of calculation

average

public static java.lang.Object average(java.lang.String field)
Calculates average of a field.

Parameters:
field - the column name
Returns:
result of calculation

average

public static java.lang.Object average(java.lang.String field,
                                       java.lang.String options)
Calculates average of a field.

Parameters:
field - the column name
options - options of calculation
Returns:
result of calculation

maximum

public static java.lang.Object maximum(java.lang.String field)
Calculates maximum of a field.

Parameters:
field - the column name
Returns:
result of calculation

maximum

public static java.lang.Object maximum(java.lang.String field,
                                       java.lang.String options)
Calculates maximum of a field.

Parameters:
field - the column name
options - options of calculation
Returns:
result of calculation

minium

public static java.lang.Object minium(java.lang.String field)
Calculates minimum of a field.

Parameters:
field - the column name
Returns:
result of calculation

minium

public static java.lang.Object minium(java.lang.String field,
                                      java.lang.String options)
Calculates minimum of a field.

Parameters:
field - the column name
options - options of calculation
Returns:
result of calculation

calculate

public static java.lang.Object calculate(java.lang.String function,
                                         java.lang.String field,
                                         java.lang.String options)
Calculates by a function on a field.

Parameters:
function - the sql function name
field - the column name
options - options of calculation
Returns:
result of calculation

homeInstance

public static <T extends ActiveRecord> T homeInstance()
Returns the home instance of the record type. The home instance is the singleton instance that represents the record type.


primaryKeyNames

public static java.util.List<java.lang.String> primaryKeyNames()
Returns a list of primary key column names.


readOnlyColumnNames

public static java.util.List<java.lang.String> readOnlyColumnNames()
Returns a list of read-only column names.


columnNames

public static java.util.List<java.lang.String> columnNames()
Returns a list of column names.


columns

public static java.util.List<ColumnInfo> columns()
Returns a list of ColumnInfo instances.


rowInfo

public static RowInfo rowInfo()
Returns the RowInfo of the record.


connectionName

public static java.lang.String connectionName()
Returns the connection name of associated with the record type.


tableName

public static java.lang.String tableName()
Returns the table name of associated with the record type.


simpleTableName

public static java.lang.String simpleTableName()
Returns the simple table name of associated with the record type.