Package org.cyclos.entities.users
Class BasicGroup
-
- All Implemented Interfaces:
Cloneable,Comparable<NamedEntity>,HasNetwork,ProcessableForDataTranslation,DefinesNetwork,ProductOwner,IEntity,IInternalNamedEntity,INamedEntity
@Entity public abstract class BasicGroup extends ConfigurationEntity implements ProductOwner, DefinesNetwork
Basic class for groups that have basic settings, like password length, password policy and so on.
-
-
Field Summary
Fields Modifier and Type Field Description protected AdminGroupTypeadminTypeThis represents the admin group type of a group.protected BooleanenabledThis represents if a group is enabled.
-
Constructor Summary
Constructors Constructor Description BasicGroup()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanaddProduct(Product product)intcompareTo(NamedEntity o)ConfigurationgetConfiguration()DataTranslationTypegetDataTranslationType()If this entity allows data translation, should return the translation typeabstract BasicGroupNaturegetNature()NetworkgetNetwork()Returns the network this entity belongs toSet<Product>getProducts()booleanremoveProduct(Product product)voidsetConfiguration(Configuration configuration)voidsetNetwork(Network network)voidsetProducts(Set<Product> products)-
Methods inherited from class org.cyclos.entities.ConfigurationEntity
getDescription, getInternalName, setDescription, setInternalName, toShortString, toString
-
Methods inherited from class org.cyclos.entities.NamedEntity
getName, getNames, setName
-
Methods inherited from class org.cyclos.entities.BaseEntity
getVersion
-
Methods inherited from class org.cyclos.entities.NetworkedEntity
isGlobal
-
Methods inherited from class org.cyclos.entities.SimpleEntity
clone, equals, getId, hashCode, id, ids, isPersistent, isTransient, setId, uniqueIds, uniqueIds
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.cyclos.model.IInternalNamedEntity
matches
-
Methods inherited from interface org.cyclos.entities.users.ProductOwner
getAllProducts
-
-
-
-
Field Detail
-
enabled
protected Boolean enabled
This represents if a group is enabled. Indeed it only belongs to some sub-classes, to know:Groupbut we put it here so we can make (DB) queries simpler. Here we have only the property the corresponding get/set methods are in the proper subclass.
-
adminType
protected AdminGroupType adminType
This represents the admin group type of a group. Indeed it only belongs to some sub-classes, to know:AdminGroupbut we put it here so we can make (DB) queries simpler. Here we have only the property the corresponding get/set methods are in the proper subclass.
-
-
Method Detail
-
addProduct
public boolean addProduct(Product product)
- Specified by:
addProductin interfaceProductOwner
-
compareTo
public int compareTo(NamedEntity o)
- Specified by:
compareToin interfaceComparable<NamedEntity>- Overrides:
compareToin classNamedEntity
-
getConfiguration
public Configuration getConfiguration()
-
getDataTranslationType
public DataTranslationType getDataTranslationType()
Description copied from class:BaseEntityIf this entity allows data translation, should return the translation type- Overrides:
getDataTranslationTypein classBaseEntity- Returns:
-
getNature
public abstract BasicGroupNature getNature()
-
getNetwork
public Network getNetwork()
Description copied from interface:HasNetworkReturns the network this entity belongs to- Specified by:
getNetworkin interfaceHasNetwork- Specified by:
getNetworkin interfaceProductOwner
-
getProducts
public Set<Product> getProducts()
- Specified by:
getProductsin interfaceProductOwner
-
removeProduct
public boolean removeProduct(Product product)
- Specified by:
removeProductin interfaceProductOwner
-
setConfiguration
public void setConfiguration(Configuration configuration)
-
setNetwork
public void setNetwork(Network network)
- Specified by:
setNetworkin interfaceDefinesNetwork
-
-