Package mc.core.model.system
Class Basket
java.lang.Object
mc.core.model.base.EntityBase
mc.core.model.base.SimpleEntity
mc.core.model.system.Basket
- All Implemented Interfaces:
Serializable,IBaseEntity,ICoreEntity,IEntity,ISortableEntity
Entity serving to collect objects of the same type for an user in order to buy or download them. Currently only
Assets are implemented as BasketItems, but Basket allows any kind of object.
transient information, not stored in db, set during processing of Basket:
owner: Principal (User or Usergroup), mandatorybasketItems: List of items in basket, BasketItem is a generic classitemObjectClass: String, mandatory, valid class name of the object class contained in the basketfileId: reference to packed basket file in file content storetransient information, not stored in db, set during processing of Basket:
sizeInBytes,
sizePackedInBytes, subItemCount.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumno property fields, used as parameter constant and label keyNested classes/interfaces inherited from class mc.core.model.base.EntityBase
EntityBase.EntityComparator -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intshared with full control (insert/edit/delete/)Fields inherited from class mc.core.model.base.EntityBase
INTDESC_COLUMN_LENGTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBasketItem(BasketItem basketItem) voidaddBasketReceiver(BasketReceiver receiver) booleanWARNING: return all basket items, visibility not checked!getExportName(Locale locale) basket export name with ".zip" extension (for file download)getExportName(Locale locale, String postfix) basket export name with given postfix (for export)getOwner()transient for mapping from entity manager and existing codeintlonglongintinthashCode()booleanbooleanisLocked()booleanisShared()booleanbooleanbooleanisShareValid(boolean onCreation) voidsetBasketItems(List<BasketItem> basketItems) voidsetBasketReceiver(List<BasketReceiver> receivers) voidsetDateOfExport(Calendar dateOfExport) voidsetEntityProfile(EntityProfile entityProfile) voidsetExternalCollaborated(boolean externalCollaborated) voidvoidsetFilename(String filename) voidsetItemObjectClass(String objectClass) voidsetLocked(boolean locked) voidvoidsetSelectedItemCount(int selectedItemCount) voidsetShared(boolean shared) voidsetSharedFullControl(boolean fullControl) voidsetShareValidFrom(Calendar shareValidFrom) voidsetShareValidUntil(Calendar shareValidUntil) voidsetSizeInBytes(long sizeInBytes) voidsetSizePackedInBytes(long packedSizeInBytes) voidsetSubItemCount(int subItemCount) Methods inherited from class mc.core.model.base.SimpleEntity
getId, getInternalDescription, getIsActive, setId, setIsActiveMethods inherited from class mc.core.model.base.EntityBase
getCollection, getDescription, getDescription, getFlag, getIsSystem, getName, getName, getNamespace, getPrio, setCollection, setDescription, setDescription, setFlag, setInternalDescription, setIsSystem, setName, setName, setNamespace, setPrio, toString
-
Field Details
-
FLAG_SHARED
public static final int FLAG_SHARED- See Also:
-
FLAG_LOCKED
public static final int FLAG_LOCKED- See Also:
-
FLAG_SHARED_FULL_CONTROL
public static final int FLAG_SHARED_FULL_CONTROLshared with full control (insert/edit/delete/)- See Also:
-
FLAG_EXTERNAL_COLLABORATION
public static final int FLAG_EXTERNAL_COLLABORATION- See Also:
-
-
Constructor Details
-
Basket
public Basket()default constructor
-
-
Method Details
-
getBasketItems
WARNING: return all basket items, visibility not checked!- Returns:
- all basket items
-
setBasketItems
-
addBasketItem
-
getEntityProfile
-
setEntityProfile
-
getOwner
-
setOwner
-
getDateOfExport
-
setDateOfExport
-
getItemObjectClass
-
setItemObjectClass
-
getFileId
-
setFileId
-
getFilename
- Returns:
- the filename of a file, referenced by
fileIdand stored in the file content store.
-
setFilename
-
getDateCreated
-
getDateModified
-
isLocked
public boolean isLocked() -
isExternalCollaborated
public boolean isExternalCollaborated() -
setExternalCollaborated
public void setExternalCollaborated(boolean externalCollaborated) -
setLocked
public void setLocked(boolean locked) -
getBasketReceiver
-
setBasketReceiver
-
addBasketReceiver
-
getReceivers
transient for mapping from entity manager and existing code- Returns:
- list of
Principalfrom the list ofBasketReceiver
-
getSizePackedInBytes
public long getSizePackedInBytes() -
setSizePackedInBytes
public void setSizePackedInBytes(long packedSizeInBytes) -
getSizeInBytes
public long getSizeInBytes() -
setSizeInBytes
public void setSizeInBytes(long sizeInBytes) -
getSelectedItemCount
public int getSelectedItemCount() -
setSelectedItemCount
public void setSelectedItemCount(int selectedItemCount) -
getSubItemCount
public int getSubItemCount() -
setSubItemCount
public void setSubItemCount(int subItemCount) -
getExportName
basket export name with ".zip" extension (for file download) -
getExportName
basket export name with given postfix (for export) -
equals
- Overrides:
equalsin classEntityBase
-
hashCode
public int hashCode()- Overrides:
hashCodein classEntityBase
-