@Entity public class ResourceImpl extends Object implements Resource, Auditable<Integer>, Closeable
Resource
-implementationConstructor and Description |
---|
ResourceImpl() |
ResourceImpl(Application application,
Resource resource) |
Modifier and Type | Method and Description |
---|---|
void |
calculateChecksum() |
void |
close() |
Application |
getApplication() |
String |
getAuditName() |
@NotNull byte[] |
getBytes()
Returns the byte data of the
Resource . |
File |
getCachedFile()
Returns a cached version of the
Resource s file. |
String |
getCheckSum()
Returns the checksum of the byte data
|
String |
getDescription()
Returns the description.
|
Integer |
getId()
Returns the id.
|
String |
getName()
Returns the name.
|
ResourceType |
getResourceType()
Returns the type of this
Resource . |
int |
getSize()
Returns the size (in bytes) of this
Resource . |
Date |
getVersion()
Returns the version.
|
void |
setApplication(Application application) |
void |
setBytes(byte[] bytes) |
void |
setCachedFile(File cachedFile)
Sets the cached version of the
Resource s file. |
void |
setCheckSum(String checkSum) |
void |
setDescription(String description) |
void |
setId(Integer id) |
void |
setName(String name) |
void |
setResourceType(ResourceType type) |
void |
setVersion(Date version) |
public ResourceImpl()
public ResourceImpl(Application application, Resource resource)
public Integer getId()
Identifiable
getId
in interface Identifiable<Integer>
public void setId(Integer id)
public void setName(String name)
public String getDescription()
Nameable
getDescription
in interface Nameable
public void setDescription(String description)
public Date getVersion()
Versionable
getVersion
in interface Versionable<Date>
public void setVersion(Date version)
public Application getApplication()
public void setApplication(Application application)
public ResourceType getResourceType()
Resource
Resource
.getResourceType
in interface Resource
public void setResourceType(ResourceType type)
@NotNull public @NotNull byte[] getBytes()
Resource
Resource
.public void setBytes(byte[] bytes)
public String getCheckSum()
Resource
getCheckSum
in interface Resource
public void setCheckSum(String checkSum)
public File getCachedFile()
Resource
Resource
s file.getCachedFile
in interface Resource
public void setCachedFile(File cachedFile)
Resource
Resource
s file.setCachedFile
in interface Resource
cachedFile
- the cached filepublic int getSize()
Resource
Resource
.public void calculateChecksum()
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public String getAuditName()
getAuditName
in interface Auditable<Integer>
Copyright © 2011–2019 aiticon GmbH. All rights reserved.