Class ClassMetadata
- java.lang.Object
-
- org.neotropic.kuwaiba.core.apis.persistence.metadata.ClassMetadataLight
-
- org.neotropic.kuwaiba.core.apis.persistence.metadata.ClassMetadata
-
- All Implemented Interfaces:
Serializable
public class ClassMetadata extends ClassMetadataLight
Contains the detailed metadata information about a class- Author:
- Charles Edward Bedon Cortazar <charles.bedon@kuwaiba.org>
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ClassMetadata()
ClassMetadata(long id, String name, String displayName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AttributeMetadata
getAttribute(String attributeName)
List<AttributeMetadata>
getAttributes()
long
getCreationDate()
String
getDescription()
byte[]
getIcon()
String
getType(String attributeName)
boolean
hasAttribute(String attribute)
Checks if the current class has a given attributeboolean
isCountable()
boolean
isMandatory(String attributeName)
boolean
isMultiple(String attributeName)
Tells if a given (list type) attribute is multiple or singleboolean
isUnique(String attributeName)
void
setAttributes(List<AttributeMetadata> attributes)
void
setCountable(boolean countable)
void
setCreationDate(long creationDate)
void
setDescription(String description)
void
setIcon(byte[] icon)
-
Methods inherited from class org.neotropic.kuwaiba.core.apis.persistence.metadata.ClassMetadataLight
equals, getColor, getDisplayName, getId, getName, getParentClassName, getSmallIcon, hashCode, isAbstract, isAdministrative, isCustom, isInDesign, isListType, isViewable, setAbstract, setAdministrative, setColor, setCustom, setDisplayName, setId, setInDesign, setListType, setName, setParentClassName, setSmallIcon, setViewable, toString
-
-
-
-
Method Detail
-
isCountable
public boolean isCountable()
-
setCountable
public void setCountable(boolean countable)
-
getIcon
public byte[] getIcon()
-
setIcon
public void setIcon(byte[] icon)
-
getAttributes
public List<AttributeMetadata> getAttributes()
-
setAttributes
public void setAttributes(List<AttributeMetadata> attributes)
-
getDescription
public String getDescription()
-
setDescription
public void setDescription(String description)
-
getCreationDate
public long getCreationDate()
-
setCreationDate
public void setCreationDate(long creationDate)
-
getAttribute
public AttributeMetadata getAttribute(String attributeName)
-
hasAttribute
public boolean hasAttribute(String attribute)
Checks if the current class has a given attribute- Parameters:
attribute
- attribute's name- Returns:
- if the class has or not such attribute
-
getType
public String getType(String attributeName) throws InvalidArgumentException
- Throws:
InvalidArgumentException
-
isMandatory
public boolean isMandatory(String attributeName) throws InvalidArgumentException
- Throws:
InvalidArgumentException
-
isUnique
public boolean isUnique(String attributeName) throws InvalidArgumentException
- Throws:
InvalidArgumentException
-
isMultiple
public boolean isMultiple(String attributeName) throws InvalidArgumentException
Tells if a given (list type) attribute is multiple or single- Parameters:
attributeName
- The name of the attribute- Returns:
- true if the attribute is multiple. False otherwise
- Throws:
InvalidArgumentException
- If the attribute does not exist
-
-