Class Association
- java.lang.Object
-
- org.javalite.activejdbc.associations.Association
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
BelongsToAssociation
,BelongsToPolymorphicAssociation
,Many2ManyAssociation
,OneToManyAssociation
,OneToManyPolymorphicAssociation
public abstract class Association extends Object implements Serializable
Associations are synonymous with relationships. However, in some cases, the DB might have referential integrity constraints. ActiveJDBC does not account for DB referential integrity constraints, associations rather based on conventions and convention overrides.- Author:
- Igor Polevoy
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Association(Class<? extends Model> source, Class<? extends Model> target)
Association(Map<String,Object> map)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<? extends Model>
getSourceClass()
Returns source class of this association.Class<? extends Model>
getTargetClass()
Returns target class of this association.int
hashCode()
Map<String,Object>
toMap()
-
-
-
Field Detail
-
SOURCE
public static final String SOURCE
- See Also:
- Constant Field Values
-
TARGET
public static final String TARGET
- See Also:
- Constant Field Values
-
CLASS
public static final String CLASS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Association
public Association(Map<String,Object> map) throws ClassNotFoundException
- Throws:
ClassNotFoundException
-
-
Method Detail
-
getSourceClass
public Class<? extends Model> getSourceClass()
Returns source class of this association.- Returns:
- source class of this association.
-
getTargetClass
public Class<? extends Model> getTargetClass()
Returns target class of this association.- Returns:
- target class of this association.
-
-