Class AFileMetaEntity<TBase extends de.xima.cmn.dao.interfaces.IEntity<Long>, TData extends IFileDataEntity<?>>
java.lang.Object
de.xima.cmn.dao.model.AEntity<Long>
de.xima.fc.entities.AbstractEntity
de.xima.fc.entities.AbstractLockableEntity
de.xima.fc.entities.common.file.AFileMetaEntity<TBase,TData>
- Type Parameters:
TBase- type of the base entity determines the type this file meta entity can be attached to.TData- type of the data entity that stores the actual file data.
- All Implemented Interfaces:
de.xima.cmn.dao.interfaces.IEntity<Long>, de.xima.cmn.dao.interfaces.ILockableEntity<Long>, IFileMetaEntity<TBase,TData>, ILockingVersionProviding, ITransferable, ITransferableEntity, ITransferableLockableEntity, IUUIDEntity, Serializable, Comparable<de.xima.cmn.dao.interfaces.IEntity<Long>>
- Direct Known Subclasses:
AScopedFileMetaEntity
@MappedSuperclass
public abstract class AFileMetaEntity<TBase extends de.xima.cmn.dao.interfaces.IEntity<Long>, TData extends IFileDataEntity<?>>
extends AbstractLockableEntity
implements IFileMetaEntity<TBase,TData>
Abstract base class for file meta entities.
- Since:
- 8.2.0
- Author:
- XIMA MEDIA GmbH
- See Also:
-
Field Summary
Fields inherited from class AbstractLockableEntity
COL_LOCKINGVERSION, lockingVersionFields inherited from class AbstractEntity
COL_ID, idFields inherited from interface de.xima.cmn.dao.interfaces.IEntity
ATTR_IDFields inherited from interface IFileMetaEntity
ATTR_CREATED_TIMESTAMP, ATTR_ENTITY, ATTR_FILE_NAME, ATTR_FILE_SIZE, ATTR_MIME_TYPE, ATTR_MODIFIED_TIMESTAMP, ATTR_USER_NAME_CREATED, ATTR_USER_NAME_MODIFIED, COL_CREATED_TIMESTAMP, COL_ENTITY_ID, COL_FILE_NAME, COL_FILE_SIZE, COL_MIME_TYPE, COL_MODIFIED_TIMESTAMP, COL_USER_NAME_CREATED, COL_USER_NAME_MODIFIEDFields inherited from interface de.xima.cmn.dao.interfaces.ILockableEntity
ATTR_LOCKINGVERSIONFields inherited from interface ITransferableEntity
IMPORT_ID, INVALID_IDFields inherited from interface IUUIDEntity
ATTR_UUID, COL_UUID, INVALID_UUID, INVALID_UUID_OBJECT, NULL_SAFE_UUID_TYPE, NULLABLE_UUID_TYPE, TYPE_NAME_UUID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcopyBasics(AFileMetaEntity<TBase, TData> clone) Gets the created timestampGets the name of the person which created the fileDeprecated.Gets the entity holding the actual data of the file.Gets the file nameintGets the file sizeGets the MIME type of this file.Gets the modified timestampGets the name of the person which last modified the filegetUUID()Gets the UUID (universal unique identifier) that uniquely identifies this type of entity.Gets the UUID (universal unique identifier) that uniquely identifies this type of entity.protected abstract TDatavoidsetBaseEntity(TBase baseEntity) voidsetCreatedInstant(Instant createdInstant) Sets the created timestampvoidsetCreatorName(String creatorName) Sets the name of the person which created the filevoidsetData(byte[] data) Sets the actual data of the file.protected voidsetDataEntities(List<TData> dataEntities) Deprecated.UsegetDataEntity()instead.voidsetFileName(String fileName) Sets the file namevoidsetFileSize(int fileSize) Sets the file sizevoidsetMimeType(String mimeType) Sets the MIME type of this file.voidsetModifiedInstant(Instant modifiedInstant) Sets the modified timestampvoidsetModifierName(String modifierName) Sets the name of the person which last modified the filevoidSets the UUID (universal unique identifier) that uniquely identifies this type of entity.voidsetUUIDObject(UUID uuid) Methods inherited from class AbstractLockableEntity
entityHasChanged, getLockingVersion, setLockingVersion, toStringMethods inherited from class AbstractEntity
asIntValue, isPersisted, setId, setIdMethods inherited from class de.xima.cmn.dao.model.AEntity
compareTo, equals, getDBTableName, hashCodeMethods inherited from interface Comparable
compareToMethods inherited from interface de.xima.cmn.dao.interfaces.IEntity
getId, isPersisted, setIdMethods inherited from interface de.xima.cmn.dao.interfaces.ILockableEntity
entityHasChanged, getLockingVersion, setLockingVersionMethods inherited from interface ILockingVersionProviding
getLockingVersion
-
Constructor Details
-
AFileMetaEntity
public AFileMetaEntity()
-
-
Method Details
-
getBaseEntity
- Specified by:
getBaseEntityin interfaceIFileMetaEntity<TBase extends de.xima.cmn.dao.interfaces.IEntity<Long>, TData extends IFileDataEntity<?>>
-
setBaseEntity
- Specified by:
setBaseEntityin interfaceIFileMetaEntity<TBase extends de.xima.cmn.dao.interfaces.IEntity<Long>, TData extends IFileDataEntity<?>>
-
getUUID
Description copied from interface:IUUIDEntityGets the UUID (universal unique identifier) that uniquely identifies this type of entity. Whether the UUID must be globally unique or only with within a context depends on the type of entity. Common contexts are for exampleclient scopesorproject scope.- Specified by:
getUUIDin interfaceIUUIDEntity- Returns:
- The UUID of the entity.
-
setUUID
Description copied from interface:IUUIDEntitySets the UUID (universal unique identifier) that uniquely identifies this type of entity. Whether the UUID must be globally unique or only with within a context depends on the type of entity. Common contexts are for exampleclient scopesorproject scope.- Specified by:
setUUIDin interfaceIUUIDEntity- Parameters:
uuid- The UUID of the entity.
-
getUUIDObject
Description copied from interface:IUUIDEntityGets the UUID (universal unique identifier) that uniquely identifies this type of entity. Whether the UUID must be globally unique or only with within a context depends on the type of entity. Common contexts are for exampleclient scopesorproject scope.- Specified by:
getUUIDObjectin interfaceIUUIDEntity- Returns:
- The UUID of the entity.
-
setUUIDObject
-
getFileName
Description copied from interface:IFileMetaEntityGets the file name- Specified by:
getFileNamein interfaceIFileMetaEntity<TBase extends de.xima.cmn.dao.interfaces.IEntity<Long>, TData extends IFileDataEntity<?>>- Returns:
- the file name
-
setFileName
Description copied from interface:IFileMetaEntitySets the file name- Specified by:
setFileNamein interfaceIFileMetaEntity<TBase extends de.xima.cmn.dao.interfaces.IEntity<Long>, TData extends IFileDataEntity<?>>- Parameters:
fileName- the file name to set
-
getFileSize
public int getFileSize()Description copied from interface:IFileMetaEntityGets the file size- Specified by:
getFileSizein interfaceIFileMetaEntity<TBase extends de.xima.cmn.dao.interfaces.IEntity<Long>, TData extends IFileDataEntity<?>>- Returns:
- the file size
-
setFileSize
public void setFileSize(int fileSize) Description copied from interface:IFileMetaEntitySets the file size- Specified by:
setFileSizein interfaceIFileMetaEntity<TBase extends de.xima.cmn.dao.interfaces.IEntity<Long>, TData extends IFileDataEntity<?>>- Parameters:
fileSize- the file size to set
-
getMimeType
Description copied from interface:IFileMetaEntityGets the MIME type of this file.- Specified by:
getMimeTypein interfaceIFileMetaEntity<TBase extends de.xima.cmn.dao.interfaces.IEntity<Long>, TData extends IFileDataEntity<?>>- Returns:
- the MIME type
-
setMimeType
Description copied from interface:IFileMetaEntitySets the MIME type of this file.- Specified by:
setMimeTypein interfaceIFileMetaEntity<TBase extends de.xima.cmn.dao.interfaces.IEntity<Long>, TData extends IFileDataEntity<?>>- Parameters:
mimeType- to set.
-
getCreatedInstant
Description copied from interface:IFileMetaEntityGets the created timestamp- Specified by:
getCreatedInstantin interfaceIFileMetaEntity<TBase extends de.xima.cmn.dao.interfaces.IEntity<Long>, TData extends IFileDataEntity<?>>- Returns:
- the created timestamp
-
setCreatedInstant
Description copied from interface:IFileMetaEntitySets the created timestamp- Specified by:
setCreatedInstantin interfaceIFileMetaEntity<TBase extends de.xima.cmn.dao.interfaces.IEntity<Long>, TData extends IFileDataEntity<?>>- Parameters:
createdInstant- the created timestamp to set
-
getModifiedInstant
Description copied from interface:IFileMetaEntityGets the modified timestamp- Specified by:
getModifiedInstantin interfaceIFileMetaEntity<TBase extends de.xima.cmn.dao.interfaces.IEntity<Long>, TData extends IFileDataEntity<?>>- Returns:
- the modified timestamp
-
setModifiedInstant
Description copied from interface:IFileMetaEntitySets the modified timestamp- Specified by:
setModifiedInstantin interfaceIFileMetaEntity<TBase extends de.xima.cmn.dao.interfaces.IEntity<Long>, TData extends IFileDataEntity<?>>- Parameters:
modifiedInstant- the modified timestamp to set
-
getCreatorName
Description copied from interface:IFileMetaEntityGets the name of the person which created the file- Specified by:
getCreatorNamein interfaceIFileMetaEntity<TBase extends de.xima.cmn.dao.interfaces.IEntity<Long>, TData extends IFileDataEntity<?>>- Returns:
- the name of the person which created the file
-
setCreatorName
Description copied from interface:IFileMetaEntitySets the name of the person which created the file- Specified by:
setCreatorNamein interfaceIFileMetaEntity<TBase extends de.xima.cmn.dao.interfaces.IEntity<Long>, TData extends IFileDataEntity<?>>- Parameters:
creatorName- the name of the person which created the file to set
-
getModifierName
Description copied from interface:IFileMetaEntityGets the name of the person which last modified the file- Specified by:
getModifierNamein interfaceIFileMetaEntity<TBase extends de.xima.cmn.dao.interfaces.IEntity<Long>, TData extends IFileDataEntity<?>>- Returns:
- the name of the person which last modified the file
-
setModifierName
Description copied from interface:IFileMetaEntitySets the name of the person which last modified the file- Specified by:
setModifierNamein interfaceIFileMetaEntity<TBase extends de.xima.cmn.dao.interfaces.IEntity<Long>, TData extends IFileDataEntity<?>>- Parameters:
modifierName- the name of the person which last modified the file to set
-
getDataEntity
Description copied from interface:IFileMetaEntityGets the entity holding the actual data of the file.- Specified by:
getDataEntityin interfaceIFileMetaEntity<TBase extends de.xima.cmn.dao.interfaces.IEntity<Long>, TData extends IFileDataEntity<?>>- Returns:
- the data entity
-
setData
public void setData(byte[] data) Description copied from interface:IFileMetaEntitySets the actual data of the file.- Specified by:
setDatain interfaceIFileMetaEntity<TBase extends de.xima.cmn.dao.interfaces.IEntity<Long>, TData extends IFileDataEntity<?>>- Parameters:
data- to set in binary form.
-
getDataEntities
Deprecated.UsegetDataEntity()instead. This method is for JPA persisting only. -
setDataEntities
Deprecated.UsegetDataEntity()instead. This method is for JPA reading only. -
newDataEntity
-
copyBasics
-
getDataEntity()instead.