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 void
copyBasics(AFileMetaEntity<TBase,TData> clone)
TBase
getBaseEntity()
Instant
getCreatedInstant()
Gets the created timestampString
getCreatorName()
Gets the name of the person which created the fileprotected List<TData>
getDataEntities()
Deprecated.UsegetDataEntity()
instead.TData
getDataEntity()
Gets the entity holding the actual data of the file.String
getFileName()
Gets the file nameint
getFileSize()
Gets the file sizeString
getMimeType()
Gets the MIME type of this file.Instant
getModifiedInstant()
Gets the modified timestampString
getModifierName()
Gets the name of the person which last modified the fileString
getUUID()
Gets the UUID (universal unique identifier) that uniquely identifies this type of entity.UUID
getUUIDObject()
Gets the UUID (universal unique identifier) that uniquely identifies this type of entity.protected abstract TData
newDataEntity()
void
setBaseEntity(TBase baseEntity)
void
setCreatedInstant(Instant createdInstant)
Sets the created timestampvoid
setCreatorName(String creatorName)
Sets the name of the person which created the filevoid
setData(byte[] data)
Sets the actual data of the file.protected void
setDataEntities(List<TData> dataEntities)
Deprecated.UsegetDataEntity()
instead.void
setFileName(String fileName)
Sets the file namevoid
setFileSize(int fileSize)
Sets the file sizevoid
setMimeType(String mimeType)
Sets the MIME type of this file.void
setModifiedInstant(Instant modifiedInstant)
Sets the modified timestampvoid
setModifierName(String modifierName)
Sets the name of the person which last modified the filevoid
setUUID(String uuid)
Sets the UUID (universal unique identifier) that uniquely identifies this type of entity.void
setUUIDObject(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:
getBaseEntity
in interfaceIFileMetaEntity<TBase extends de.xima.cmn.dao.interfaces.IEntity<Long>,TData extends IFileDataEntity<?>>
-
setBaseEntity
public void setBaseEntity(TBase baseEntity)
- Specified by:
setBaseEntity
in interfaceIFileMetaEntity<TBase extends de.xima.cmn.dao.interfaces.IEntity<Long>,TData extends IFileDataEntity<?>>
-
getUUID
public String getUUID()
Description copied from interface:IUUIDEntity
Gets 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 scopes
orproject scope
.- Specified by:
getUUID
in interfaceIUUIDEntity
- Returns:
- The UUID of the entity.
-
setUUID
public void setUUID(String uuid)
Description copied from interface:IUUIDEntity
Sets 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 scopes
orproject scope
.- Specified by:
setUUID
in interfaceIUUIDEntity
- Parameters:
uuid
- The UUID of the entity.
-
getUUIDObject
public UUID getUUIDObject()
Description copied from interface:IUUIDEntity
Gets 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 scopes
orproject scope
.- Specified by:
getUUIDObject
in interfaceIUUIDEntity
- Returns:
- The UUID of the entity.
-
setUUIDObject
public void setUUIDObject(UUID uuid)
-
getFileName
public String getFileName()
Description copied from interface:IFileMetaEntity
Gets the file name- Specified by:
getFileName
in 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:IFileMetaEntity
Sets the file name- Specified by:
setFileName
in 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:IFileMetaEntity
Gets the file size- Specified by:
getFileSize
in 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:IFileMetaEntity
Sets the file size- Specified by:
setFileSize
in 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:IFileMetaEntity
Gets the MIME type of this file.- Specified by:
getMimeType
in 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:IFileMetaEntity
Sets the MIME type of this file.- Specified by:
setMimeType
in 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:IFileMetaEntity
Gets the created timestamp- Specified by:
getCreatedInstant
in 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:IFileMetaEntity
Sets the created timestamp- Specified by:
setCreatedInstant
in 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:IFileMetaEntity
Gets the modified timestamp- Specified by:
getModifiedInstant
in 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:IFileMetaEntity
Sets the modified timestamp- Specified by:
setModifiedInstant
in 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:IFileMetaEntity
Gets the name of the person which created the file- Specified by:
getCreatorName
in 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:IFileMetaEntity
Sets the name of the person which created the file- Specified by:
setCreatorName
in 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:IFileMetaEntity
Gets the name of the person which last modified the file- Specified by:
getModifierName
in 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:IFileMetaEntity
Sets the name of the person which last modified the file- Specified by:
setModifierName
in 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:IFileMetaEntity
Gets the entity holding the actual data of the file.- Specified by:
getDataEntity
in 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:IFileMetaEntity
Sets the actual data of the file.- Specified by:
setData
in 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)
-
-