Uses of Class
org.javalite.activejdbc.Model
Packages that use Model
Package
Description
ActiveJDBC - the agile Java ORM.
Contains classes describing various association types.
JavaLite Async, see JavaLite Async.
-
Uses of Model in org.javalite.activejdbc
Classes in org.javalite.activejdbc with type parameters of type ModelModifier and TypeClassDescriptionclassCallbackAdapter<T extends Model>interfaceCallbackListener<T extends Model>classWhile this class is public, it is never instantiated directly.interfaceModelListener<T extends Model>classThis 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 ModelModifier and TypeMethodDescription<T extends Model>
voidConvenience method.ScopeBuilder.all()Use in case the scopes define all criteria you need.static <T extends Model>
TThis is a convenience method to create a model instance already initialized with values.static <T extends Model>
Tstatic <T extends Model>
TThis is a convenience method tocreate(Object...).static <T extends Model>
T<T extends Model>
voidModel.deleteChildrenShallow(Class<T> clazz)Deletes immediate children (does not walk the dependency tree).Synonym ofwhere(String, Object...)Model.findAll()This method returns all records from this table.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>
Tstatic <T extends Model>
TFree form query finder.static <T extends Model>
TSynonym offirst(String, Object...).static <T extends Model>
Tstatic <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>
TReturns a first result for this condition.<T extends Model>
TOverrides attribute values from input map.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.This methods supports one to many, many to many relationships as well as polymorphic associations.This method includes associated objects.static <E extends Model>
Paginator.PaginatorBuilder<E>Paginator.instance()Use to create a paginator instance, and provide arguments as needed.LazyList.limit(long limit)This method limits the number of results in the resultset.SuperLazyList.limit(long limit)LazyList.load()This method exists to force immediate load from DB.SuperLazyList.load()LazyList.offset(long offset)This method sets an offset of a resultset.SuperLazyList.offset(long offset)Use this method to order results by a column.<P extends Model>
PReturns parent of this model, assuming that this table represents a child.<P extends Model>
PSame asparent(Class), with additional argument.static <T extends Model>
ScopeBuilder<T>Allows to specify multiple scopes as filters such as:static <T extends Model>
ScopeBuilder<T>Allows to specify multiple scopes as filters such as:<T extends Model>
TThis is a convenience method to set multiple values to a model.<T extends Model>
TSets a value of an attribute.<T extends Model>
TSets attribute value asjava.sql.Array.<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>
TSets attribute value asjava.sql.Date.<T extends Model>
TSets attribute value asDouble.<T extends Model>
TSets attribute value asFloat.<T extends Model>
TConvenience 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.setJSONList(String attributeName, JSONList value)Sets aJSONListas a value of an attribute.<T extends Model>
TModel.setJSONMap(String attributeName, JSONMap value)Sets aJSONMapas a value of an attribute.<T extends Model>
TSets attribute value asLong.<T extends Model>
TSets attribute value asShort.<T extends Model>
TSets attribute value asString.<T extends Model>
TSets attribute value asjava.sql.Time.<T extends Model>
TModel.setTimestamp(String attributeName, Object value)Sets attribute value asjava.sql.Timestamp.Finder method for DB queries based on table represented by this model.Applies additional criteria to scopes defined in the model.Methods in org.javalite.activejdbc that return types with arguments of type ModelModifier and TypeMethodDescriptionMetaModel.getModelClass()Registry.getModelClass(String table, boolean suppressException)Returns model class for a table name, null if not found.ModelFinder.getModelsForDb(String dbName)Methods in org.javalite.activejdbc with parameters of type ModelModifier and TypeMethodDescriptionvoidAdds a new child dependency.voidCopies all attribute values (except for ID, created_at and updated_at) from other instance to this one.voidCopies all attribute values (except for ID, created_at and updated_at) from this instance to the other.intRemoves associated child from this instance.protected voidModel.setCachedParent(Model parent)voidSets 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 ModelModifier and TypeMethodDescriptionstatic List<Association>ModelDelegate.associations(Class<? extends Model> clazz)ModelDelegate.attributeNames(Class<? extends Model> clazz)static booleanstatic booleanstatic 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 Longstatic Longstatic voidModelDelegate.dateFormat(Class<? extends Model> clazz, String pattern, String... attributeNames)static voidModelDelegate.dateFormat(Class<? extends Model> clazz, DateFormat format, String... attributeNames)static intstatic intstatic boolean<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.MetaModel.getAssociationsForTarget(Class<? extends Model> targetModelClass)Returns associations of this table with the target table.protected static StringRegistry.getMetaModel(Class<? extends Model> modelClass)protected StringRegistry.getTableName(Class<? extends Model> modelClass)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 intstatic 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)ModelDelegate.validatorsOf(Class<? extends Model> clazz)static voidModelDelegate.zeroToNull(Class<? extends Model> clazz, String... attributeNames)Constructors in org.javalite.activejdbc with parameters of type ModelConstructor parameters in org.javalite.activejdbc with type arguments of type Model -
Uses of Model in org.javalite.activejdbc.associations
Methods in org.javalite.activejdbc.associations that return types with arguments of type ModelModifier and TypeMethodDescriptionAssociation.getSourceClass()Returns source class of this association.Association.getTargetClass()Returns target class of this association.Constructor parameters in org.javalite.activejdbc.associations with type arguments of type ModelModifierConstructorDescriptionprotectedAssociation(Class<? extends Model> source, Class<? extends Model> target)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) -
Uses of Model in org.javalite.async
Subclasses of Model in org.javalite.async -
Uses of Model in org.javalite.json
Methods in org.javalite.json that return ModelModifier and TypeMethodDescriptionModelDeserializer.deserialize(com.fasterxml.jackson.core.JsonParser p, com.fasterxml.jackson.databind.DeserializationContext ctxt)Methods in org.javalite.json with parameters of type Model