Uses of Class
org.javalite.activejdbc.Model
-
Packages that use Model Package Description org.javalite.activejdbc ActiveJDBC - the agile Java ORM.org.javalite.activejdbc.annotations Contains annotations for overriding default behaviour.org.javalite.activejdbc.associations Contains classes describing various association types. -
-
Uses of Model in org.javalite.activejdbc
Classes in org.javalite.activejdbc with type parameters of type Model Modifier and Type Class Description classCallbackAdapter<T extends Model>interfaceCallbackListener<T extends Model>classLazyList<T extends Model>While this class is public, it is never instantiated directly.interfaceModelListener<T extends Model>classPaginator<T extends Model>This class supports pagination of result sets in ActiveJDBC.static classPaginator.PaginatorBuilder<T extends Model>Provides a builder pattern to create new instances of paginator.classScopeBuilder<T extends Model>classSuperLazyList<T extends Model>The purpose of this class is to providetoMaps()method in cases of eager loading of dependencies.Methods in org.javalite.activejdbc with type parameters of type Model Modifier and Type Method Description <T extends Model>
voidModel. addModels(List<T> models)Convenience method.<T extends Model>
LazyList<T>ScopeBuilder. all()Use in case the scopes define all criteria you need.static <T extends Model>
TModel. create(Object... namesAndValues)This is a convenience method to create a model instance already initialized with values.static <T extends Model>
TModelDelegate. create(Class<T> clazz, Object... namesAndValues)static <T extends Model>
TModel. createIt(Object... namesAndValues)This is a convenience method tocreate(Object...).static <T extends Model>
TModelDelegate. createIt(Class<T> clazz, Object... namesAndValues)<T extends Model>
voidModel. deleteChildrenShallow(Class<T> clazz)Deletes immediate children (does not walk the dependency tree).static <T extends Model>
LazyList<T>Model. find(String subquery, Object... params)Synonym ofwhere(String, Object...)static <T extends Model>
LazyList<T>Model. findAll()This method returns all records from this table.static <T extends Model>
LazyList<T>ModelDelegate. findAll(Class<T> clazz)static <T extends Model>
TModel. findByCompositeKeys(Object... values)Composite PK values in exactly the same order as specified inCompositePK.static <T extends Model>
TModelDelegate. findByCompositeKeys(Class<T> clazz, Object... values)static <T extends Model>
TModel. findById(Object id)static <T extends Model>
TModelDelegate. findById(Class<T> clazz, Object id)static <T extends Model>
LazyList<T>ModelDelegate. findBySql(Class<T> clazz, String fullQuery, Object... params)static <T extends Model>
LazyList<T>Model. findBySQL(String fullQuery, Object... params)Free form query finder.static <T extends Model>
TModel. findFirst(String subQuery, Object... params)Synonym offirst(String, Object...).static <T extends Model>
TModelDelegate. findFirst(Class<T> clazz, String subQuery, Object... params)static <T extends Model>
TModel. findOrCreateIt(Object... namesAndValues)A convenience method to fetch existing model from db or to create and insert new record with attribute values.static <T extends Model>
TModelDelegate. findOrCreateIt(Class<T> clazz, boolean save, Object... namesAndValues)static <T extends Model>
TModelDelegate. findOrCreateIt(Class<T> clazz, Object... namesAndValues)static <T extends Model>
TModel. findOrInit(Object... namesAndValues)A convenience method to fetch existing model from db or to create a new instance in memory initialized with some attribute values.static <T extends Model>
TModelDelegate. findOrInit(Class<T> clazz, Object... namesAndValues)static <T extends Model,M extends T>
voidModelDelegate. findWith(Class<M> clazz, ModelListener<T> listener, String query, Object... params)static <T extends Model>
TModel. first(String subQuery, Object... params)Returns a first result for this condition.<T extends Model>
TModel. fromMap(Map input)Overrides attribute values from input map.<C extends Model>
LazyList<C>Model. get(Class<C> targetModelClass, String criteria, Object... params)Provides a list of child models in one to many, many to many and polymorphic associations, but in addition also allows to filter this list by criteria.<C extends Model>
LazyList<C>Model. getAll(Class<C> clazz)This methods supports one to many, many to many relationships as well as polymorphic associations.<E extends Model>
LazyList<E>LazyList. include(Class<? extends Model>... classes)This method includes associated objects.<E extends Model>
LazyList<E>SuperLazyList. include(Class<? extends Model>... classes)static <E extends Model>
Paginator.PaginatorBuilder<E>Paginator. instance()Use to create a paginator instance, and provide arguments as needed.<E extends Model>
LazyList<E>LazyList. limit(long limit)This method limits the number of results in the resultset.<E extends Model>
LazyList<E>SuperLazyList. limit(long limit)<E extends Model>
LazyList<E>LazyList. load()This method exists to force immediate load from DB.<E extends Model>
LazyList<E>SuperLazyList. load()<E extends Model>
LazyList<E>LazyList. offset(long offset)This method sets an offset of a resultset.<E extends Model>
LazyList<E>SuperLazyList. offset(long offset)<E extends Model>
LazyList<E>LazyList. orderBy(String orderBy)Use this method to order results by a column.<E extends Model>
LazyList<E>SuperLazyList. orderBy(String orderBy)<P extends Model>
PModel. parent(Class<P> parentClass)Returns parent of this model, assuming that this table represents a child.<P extends Model>
PModel. parent(Class<P> parentClass, boolean cache)Same asparent(Class), with additional argument.static <T extends Model>
ScopeBuilder<T>Model. scope(String scope)Allows to specify multiple scopes as filters such as:static <T extends Model>
ScopeBuilder<T>Model. scopes(String... scopes)Allows to specify multiple scopes as filters such as:<T extends Model>
TModel. set(Object... namesAndValues)This is a convenience method to set multiple values to a model.<T extends Model>
TModel. set(String attributeName, Object value)Sets a value of an attribute.<T extends Model>
TModel. setBigDecimal(String attributeName, Object value)Sets attribute value asjava.math.BigDecimal.<T extends Model>
TModel. setBoolean(String attributeName, Object value)Sets attribute value asBoolean.<T extends Model>
TModel. setDate(String attributeName, Object value)Sets attribute value asjava.sql.Date.<T extends Model>
TModel. setDouble(String attributeName, Object value)Sets attribute value asDouble.<T extends Model>
TModel. setFloat(String attributeName, Object value)Sets attribute value asFloat.<T extends Model>
TModel. setId(Object id)Convenience method, sets ID value on this model, equivalent toset(getIdName(), id).<T extends Model>
TModel. setInteger(String attributeName, Object value)Sets attribute value asInteger.<T extends Model>
TModel. setLong(String attributeName, Object value)Sets attribute value asLong.<T extends Model>
TModel. setShort(String attributeName, Object value)Sets attribute value asShort.<T extends Model>
TModel. setString(String attributeName, Object value)Sets attribute value asString.<T extends Model>
TModel. setTime(String attributeName, Object value)Sets attribute value asjava.sql.Time.<T extends Model>
TModel. setTimestamp(String attributeName, Object value)Sets attribute value asjava.sql.Timestamp.static <T extends Model>
LazyList<T>Model. where(String subquery, Object... params)Finder method for DB queries based on table represented by this model.static <T extends Model>
LazyList<T>ModelDelegate. where(Class<T> clazz, String subquery, Object... params)<T extends Model>
LazyList<T>ScopeBuilder. where(String subquery, Object... params)Applies additional criteria to scopes defined in the model.Methods in org.javalite.activejdbc that return types with arguments of type Model Modifier and Type Method Description Class<? extends Model>MetaModel. getModelClass()protected Class<? extends Model>Registry. getModelClass(String table, boolean suppressException)Returns model class for a table name, null if not found.protected static Set<Class<? extends Model>>ModelFinder. getModelsForDb(String dbName)Methods in org.javalite.activejdbc with parameters of type Model Modifier and Type Method Description voidModel. add(Model child)Adds a new child dependency.voidModel. copyFrom(Model other)Copies all attribute values (except for ID, created_at and updated_at) from other instance to this one.voidModel. copyTo(Model other)Copies all attribute values (except for ID, created_at and updated_at) from this instance to the other.intModel. remove(Model child)Removes associated child from this instance.protected voidModel. setCachedParent(Model parent)voidModel. setParent(Model parent)Sets a parent on this instance.voidModel. setParents(Model... parents)Sets multiple parents on this instance.Method parameters in org.javalite.activejdbc with type arguments of type Model Modifier and Type Method Description static List<Association>ModelDelegate. associations(Class<? extends Model> clazz)static Set<String>ModelDelegate. attributeNames(Class<? extends Model> clazz)static booleanModel. belongsTo(Class<? extends Model> targetClass)static booleanModelDelegate. belongsTo(Class<? extends Model> clazz, Class<? extends Model> targetClass)static voidModelDelegate. blankToNull(Class<? extends Model> clazz, String... attributeNames)static voidModelDelegate. callbackWith(Class<? extends Model> clazz, CallbackListener... listeners)static voidModelDelegate. convertWith(Class<? extends Model> clazz, Converter converter, String... attributeNames)static LongModelDelegate. count(Class<? extends Model> clazz)static LongModelDelegate. count(Class<? extends Model> clazz, String query, Object... params)static voidModelDelegate. dateFormat(Class<? extends Model> clazz, String pattern, String... attributeNames)static voidModelDelegate. dateFormat(Class<? extends Model> clazz, DateFormat format, String... attributeNames)static intModelDelegate. delete(Class<? extends Model> clazz, String query, Object... params)static intModelDelegate. deleteAll(Class<? extends Model> clazz)static booleanModelDelegate. exists(Class<? extends Model> clazz, Object id)<A extends Association>
AMetaModel. getAssociationForTarget(Class<? extends Model> targetClass)Returns association of this table with the target table.<A extends Association>
AMetaModel. getAssociationForTarget(Class<? extends Model> targetModelClass, Class<A> associationClass)Returns association of this table with the target table.List<Association>MetaModel. getAssociationsForTarget(Class<? extends Model> targetModelClass)Returns associations of this table with the target table.protected static StringMetaModel. getDbName(Class<? extends Model> modelClass)MetaModelRegistry. getMetaModel(Class<? extends Model> modelClass)protected StringRegistry. getTableName(Class<? extends Model> modelClass)static List<Validator>Model. getValidators(Class<? extends Model> clazz)protected booleanMetaModel. hasAssociation(Class<? extends Model> targetClass, Class<? extends Association> associationClass)booleanMetaModel. isAssociatedTo(Class<? extends Model> targetModelClass)Checks if there is association to the target model class.,static MetaModelModelDelegate. metaModelOf(Class<? extends Model> clazz)ReturnsMetaModelassociated with model class.static voidModelDelegate. purgeCache(Class<? extends Model> clazz)voidMetaModel. removeAssociationForTarget(Class<? extends Model> modelClass)static voidModelDelegate. removeValidator(Class<? extends Model> clazz, Validator validator)protected voidModel. setChildren(Class childClass, List<Model> children)static StringModelDelegate. tableNameOf(Class<? extends Model> clazz)static voidModelDelegate. timestampFormat(Class<? extends Model> clazz, String pattern, String... attributeNames)static voidModelDelegate. timestampFormat(Class<? extends Model> clazz, DateFormat format, String... attributeNames)static intModelDelegate. update(Class<? extends Model> clazz, String updates, String conditions, Object... params)static intModelDelegate. updateAll(Class<? extends Model> clazz, String updates, Object... params)static ValidationBuilderModelDelegate. validateEmailOf(Class<? extends Model> clazz, String attributeName)static NumericValidationBuilderModelDelegate. validateNumericalityOf(Class<? extends Model> clazz, String... attributeNames)static ValidationBuilderModelDelegate. validatePresenceOf(Class<? extends Model> clazz, String... attributeNames)static ValidationBuilderModelDelegate. validateRange(Class<? extends Model> clazz, String attributeName, Number min, Number max)static ValidationBuilderModelDelegate. validateRegexpOf(Class<? extends Model> clazz, String attributeName, String pattern)static ValidationBuilderModelDelegate. validateWith(Class<? extends Model> clazz, Validator validator)static List<Validator>ModelDelegate. validatorsOf(Class<? extends Model> clazz)static voidModelDelegate. zeroToNull(Class<? extends Model> clazz, String... attributeNames)Constructors in org.javalite.activejdbc with parameters of type Model Constructor Description FrozenException(Model model)Constructor parameters in org.javalite.activejdbc with type arguments of type Model Constructor Description MetaModel(String dbName, Class<? extends Model> modelClass, String dbType) -
Uses of Model in org.javalite.activejdbc.annotations
Methods in org.javalite.activejdbc.annotations that return types with arguments of type Model Modifier and Type Method Description Class<? extends Model>child()Class<? extends Model>other()This is a type of a model that is the "other" end of the relationship.Class<? extends Model>parent()Class<? extends Model>[]parents()List of parent classes.Class<? extends Model>[]value() -
Uses of Model in org.javalite.activejdbc.associations
Methods in org.javalite.activejdbc.associations that return types with arguments of type Model Modifier and Type Method Description Class<? extends Model>Association. getSourceClass()Returns source class of this association.Class<? extends Model>Association. getTargetClass()Returns target class of this association.Constructor parameters in org.javalite.activejdbc.associations with type arguments of type Model Constructor Description Association(Class<? extends Model> source, Class<? extends Model> target)BelongsToAssociation(Class<? extends Model> source, Class<? extends Model> target, String fkName)BelongsToPolymorphicAssociation(Class<? extends Model> sourceModelClass, Class<? extends Model> targetModelClass, String typeLabel, String parentClassName)Many2ManyAssociation(Class<? extends Model> sourceModelClass, Class<? extends Model> targetModelClass, String join, String sourceFkName, String targetFkName)Many2ManyAssociation(Class<? extends Model> source, Class<? extends Model> target, String join, String sourceFkName, String targetFkName, String targetPk)NotAssociatedException(Class<? extends Model> sourceClass, Class<? extends Model> targetClass)OneToManyAssociation(Class<? extends Model> sourceModelClass, Class<? extends Model> targetModelClass, String fkName)OneToManyPolymorphicAssociation(Class<? extends Model> source, Class<? extends Model> target, String typeLabel)
-