Package de.xima.fc.entities.common.file
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:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class de.xima.fc.entities.AbstractLockableEntity
COL_LOCKINGVERSION, lockingVersion
-
Fields inherited from class de.xima.fc.entities.AbstractEntity
COL_ID, id
-
Fields inherited from interface de.xima.fc.entities.interfaces.file.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_MODIFIED
-
Fields inherited from interface de.xima.fc.entities.interfaces.ITransferableEntity
IMPORT_ID, INVALID_ID
-
Fields inherited from interface de.xima.fc.entities.interfaces.IUUIDEntity
ATTR_UUID, COL_UUID, INVALID_UUID, INVALID_UUID_OBJECT, NULL_SAFE_UUID_TYPE, NULLABLE_UUID_TYPE, TYPE_NAME_UUID
-
-
Constructor Summary
Constructors Constructor Description AFileMetaEntity()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidcopyBasics(AFileMetaEntity<TBase,TData> clone)TBasegetBaseEntity()InstantgetCreatedInstant()Gets the created timestampStringgetCreatorName()Gets the name of the person which created the fileprotected List<TData>getDataEntities()Deprecated.UsegetDataEntity()instead.TDatagetDataEntity()Gets the entity holding the actual data of the file.StringgetFileName()Gets the file nameintgetFileSize()Gets the file sizeStringgetMimeType()Gets the MIME type of this file.InstantgetModifiedInstant()Gets the modified timestampStringgetModifierName()Gets the name of the person which last modified the fileStringgetUUID()Gets the UUID (universal unique identifier) that uniquely identifies this type of entity.UUIDgetUUIDObject()Gets the UUID (universal unique identifier) that uniquely identifies this type of entity.protected abstract TDatanewDataEntity()voidsetBaseEntity(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 filevoidsetUUID(String uuid)Sets the UUID (universal unique identifier) that uniquely identifies this type of entity.voidsetUUIDObject(UUID uuid)-
Methods inherited from class de.xima.fc.entities.AbstractLockableEntity
entityHasChanged, getLockingVersion, setLockingVersion, toString
-
Methods inherited from class de.xima.fc.entities.AbstractEntity
asIntValue, isPersisted, setId, setId
-
Methods inherited from class de.xima.cmn.dao.model.AEntity
compareTo, equals, getDBTableName, hashCode
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface de.xima.cmn.dao.interfaces.ILockableEntity
entityHasChanged, getLockingVersion, setLockingVersion
-
Methods inherited from interface de.xima.fc.entities.interfaces.ILockingVersionProviding
getLockingVersion
-
-
-
-
Method Detail
-
getBaseEntity
public TBase getBaseEntity()
- Specified by:
getBaseEntityin interfaceIFileMetaEntity<TBase extends de.xima.cmn.dao.interfaces.IEntity<Long>,TData extends IFileDataEntity<?>>
-
setBaseEntity
public void setBaseEntity(TBase baseEntity)
- Specified by:
setBaseEntityin interfaceIFileMetaEntity<TBase extends de.xima.cmn.dao.interfaces.IEntity<Long>,TData extends IFileDataEntity<?>>
-
getUUID
public String 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
public void setUUID(String uuid)
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
public UUID 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
public void setUUIDObject(UUID uuid)
-
getFileName
public String 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
public void setFileName(String fileName)
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
public String 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
public void setMimeType(String mimeType)
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
public Instant 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
public void setCreatedInstant(Instant createdInstant)
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
public Instant 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
public void setModifiedInstant(Instant modifiedInstant)
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
public String 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
public void setCreatorName(String creatorName)
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
public String 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
public void setModifierName(String modifierName)
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
public TData 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 protected List<TData> getDataEntities()
Deprecated.UsegetDataEntity()instead. This method is for JPA persisting only.
-
setDataEntities
@Deprecated protected void setDataEntities(List<TData> dataEntities)
Deprecated.UsegetDataEntity()instead. This method is for JPA reading only.
-
newDataEntity
protected abstract TData newDataEntity()
-
copyBasics
protected void copyBasics(AFileMetaEntity<TBase,TData> clone)
-
-