com.scooterframework.orm.activerecord
Class ActiveRecordConstants

java.lang.Object
  extended by com.scooterframework.orm.activerecord.ActiveRecordConstants

public class ActiveRecordConstants
extends java.lang.Object

ActiveRecordConstants class holds all constants used in ActiveRecord.


Field Summary
static java.lang.String key_cascade
          Key cascade representing cascade property.
static java.lang.String key_columns
          Key columns indicates the column names to be used for a query.
static java.lang.String key_conditions_sql
          Key conditions_sql represents extra conditional SQL string to be appended to a query.
static java.lang.String key_counter_cache
          Key counter_cache indicates that the parent model will keep a count of child model records.
static java.lang.String key_custom_sql
          custom_sql represents customerized SQL query.
static java.lang.String key_custom_sql_key
          Key custom_sql_key represents customized SQL query.
static java.lang.String key_ex_columns
          Key ex_columns indicates the column names not to be used for a query.
static java.lang.String key_finder_sql
          Key finder_sql represents select query to be used with other conditions and options in find related methods.
static java.lang.String key_include
          Key include is used to eagerly load associated target entities through left outer joins.
static java.lang.String key_join_type
          Key join_type indicates the type of joins.
static java.lang.String key_limit
          Key limit indicates the number of records for a query.
static java.lang.String key_mapping
          Key mapping key.
static java.lang.String key_model
          Key model key represents a model name.
static java.lang.String key_offset
          Key offset indicates the number of records to skip for a query.
static java.lang.String key_page
          Key page indicates current page number in a pagination.
static java.lang.String key_source
          Key source key represents the actual association in the join model of a has-many-through relation.
static java.lang.String key_strict_include
          Key key_strict_include is used to eagerly load associated target entities through inner joins.
static java.lang.String key_unique
          Key unique indicates if query results should be unique.
 
Constructor Summary
ActiveRecordConstants()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

key_model

public static final java.lang.String key_model
Key model key represents a model name.

See Also:
Constant Field Values

key_source

public static final java.lang.String key_source
Key source key represents the actual association in the join model of a has-many-through relation.

See Also:
Constant Field Values

key_mapping

public static final java.lang.String key_mapping
Key mapping key. It must be a string of name and value pairs separated by comma. For example, "id=customer_id" or "id=order_id, type=order_type".

See Also:
Constant Field Values

key_finder_sql

public static final java.lang.String key_finder_sql

Key finder_sql represents select query to be used with other conditions and options in find related methods.

By using finder_sql, customerized SQL queries can be used. For example, hint.

See Also:
Constant Field Values

key_custom_sql

public static final java.lang.String key_custom_sql
custom_sql represents customerized SQL query.

See Also:
Constant Field Values

key_custom_sql_key

public static final java.lang.String key_custom_sql_key
Key custom_sql_key represents customized SQL query.

See Also:
Constant Field Values

key_include

public static final java.lang.String key_include

Key include is used to eagerly load associated target entities through left outer joins.

For example, "include: category, user" means find method will eagerly load associated category and user entities by using left outer joins.

See Also:
Constant Field Values

key_strict_include

public static final java.lang.String key_strict_include

Key key_strict_include is used to eagerly load associated target entities through inner joins.

For example, "include: category, user" means find method will eagerly load associated category and user entities by using inner joins.

See Also:
Constant Field Values

key_join_type

public static final java.lang.String key_join_type

Key join_type indicates the type of joins. Allowed values are relaxed and strict.

See Also:
Constant Field Values

key_conditions_sql

public static final java.lang.String key_conditions_sql

Key conditions_sql represents extra conditional SQL string to be appended to a query.

For example, "conditions_sql: name='John'" will be appended to the end of a query string as " AND name='John'".

Note: Because equal sign '=' may appear in the conditional sql, you can only use this key with a map. Therefore the use of this key is restricted to those find and findAll methods that accept an inputOption map as an input parameter.

See Also:
Constant Field Values

key_unique

public static final java.lang.String key_unique

Key unique indicates if query results should be unique. This will add "distinct" in SQL query.

For example, "unique=true" will be translated to "SELECT DISTINCT" in a SQL query.

See Also:
Constant Field Values

key_cascade

public static final java.lang.String key_cascade
Key cascade representing cascade property.

See Also:
Constant Field Values

key_columns

public static final java.lang.String key_columns
Key columns indicates the column names to be used for a query.

See Also:
Constant Field Values

key_ex_columns

public static final java.lang.String key_ex_columns
Key ex_columns indicates the column names not to be used for a query.

See Also:
Constant Field Values

key_counter_cache

public static final java.lang.String key_counter_cache
Key counter_cache indicates that the parent model will keep a count of child model records.

See Also:
Constant Field Values

key_limit

public static final java.lang.String key_limit
Key limit indicates the number of records for a query.

See Also:
Constant Field Values

key_offset

public static final java.lang.String key_offset
Key offset indicates the number of records to skip for a query.

See Also:
Constant Field Values

key_page

public static final java.lang.String key_page
Key page indicates current page number in a pagination.

See Also:
Constant Field Values
Constructor Detail

ActiveRecordConstants

public ActiveRecordConstants()