Class DistroFile
- java.lang.Object
-
- com.aoindustries.aoserv.client.AOServObject<K,T>
-
- com.aoindustries.aoserv.client.FilesystemCachedObject<Integer,DistroFile>
-
- com.aoindustries.aoserv.client.distribution.management.DistroFile
-
- All Implemented Interfaces:
FileListObject,Streamable,StreamReadable,StreamWritable,Row,AOServReadable,AOServStreamable,AOServWritable,SingleTableObject<Integer,DistroFile>
public final class DistroFile extends FilesystemCachedObject<Integer,DistroFile>
For AO Industries use only.- Author:
- AO Industries, Inc.
-
-
Field Summary
Fields Modifier and Type Field Description static intCOLUMN_OPERATING_SYSTEM_VERSIONstatic intCOLUMN_PATHstatic longNULL_SIZEThe size may not be available for certain file types.-
Fields inherited from class com.aoindustries.aoserv.client.FilesystemCachedObject
table
-
Fields inherited from class com.aoindustries.aoserv.client.AOServObject
USE_ARRAY_OF_DOMAIN, USE_SQL_DATA, USE_SQL_DATA_WRITE
-
-
Constructor Summary
Constructors Constructor Description DistroFile()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object O)protected ObjectgetColumnImpl(int i)longgetFileSha256_0()longgetFileSha256_1()longgetFileSha256_2()longgetFileSha256_3()IntegergetKey()UsergetLinuxAccount()GroupgetLinuxGroup()longgetMode()OperatingSystemVersiongetOperatingSystemVersion()PosixPathgetPath()intgetPkey()longgetSize()StringgetSymlinkTarget()Table.TableIDgetTableID()DistroFileTypegetType()booleanhasFileSha256()inthashCode()voidinit(ResultSet result)Initializes this object from the raw database contents.booleanisOptional()voidread(StreamableInput in, AoservProtocol.Version protocolVersion)voidreadRecord(DataInputStream in)voidwrite(StreamableOutput out, AoservProtocol.Version protocolVersion)voidwriteRecord(DataOutputStream out)-
Methods inherited from class com.aoindustries.aoserv.client.FilesystemCachedObject
getTable, setTable
-
Methods inherited from class com.aoindustries.aoserv.client.AOServObject
compare, compare, compare, compare, compareIgnoreCaseConsistentWithEquals, compareTo, compareTo, compareTo, getAccountingCode, getColumn, getColumns, getColumns, getDomainLabel, getDomainLabels, getDomainName, getDto, getEmail, getGecos, getGroupId, getHashedKey, getHashedPassword, getHostname, getInetAddress, getLinuxID, getLinuxUserName, getMacAddress, getMySQLDatabaseName, getMySQLServerName, getMysqlUserName, getPort, getPostgresDatabaseName, getPostgresServerName, getPostgresUserId, getTableSchema, getTimeMillis, getTimeMillis, getUnixPath, getUserId, read, toString, toStringImpl, write
-
-
-
-
Field Detail
-
COLUMN_OPERATING_SYSTEM_VERSION
public static final int COLUMN_OPERATING_SYSTEM_VERSION
- See Also:
- Constant Field Values
-
COLUMN_PATH
public static final int COLUMN_PATH
- See Also:
- Constant Field Values
-
NULL_SIZE
public static final long NULL_SIZE
The size may not be available for certain file types.- See Also:
- Constant Field Values
-
-
Method Detail
-
equals
public boolean equals(Object O)
Description copied from class:AOServObjectImplementation Note:
This default implementation considers the object equal when it is the same class (viaObject.getClass()and has equal keys (viaAOServObject.getKey()).- Overrides:
equalsin classAOServObject<Integer,DistroFile>
-
getColumnImpl
protected Object getColumnImpl(int i)
- Specified by:
getColumnImplin classAOServObject<Integer,DistroFile>
-
getPkey
public int getPkey()
-
getOperatingSystemVersion
public OperatingSystemVersion getOperatingSystemVersion() throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
getPath
public PosixPath getPath()
-
isOptional
public boolean isOptional()
-
getType
public DistroFileType getType() throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
getMode
public long getMode()
-
getLinuxAccount
public User getLinuxAccount() throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
getLinuxGroup
public Group getLinuxGroup() throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
getSize
public long getSize()
-
hasFileSha256
public boolean hasFileSha256()
-
getFileSha256_0
public long getFileSha256_0()
-
getFileSha256_1
public long getFileSha256_1()
-
getFileSha256_2
public long getFileSha256_2()
-
getFileSha256_3
public long getFileSha256_3()
-
getSymlinkTarget
public String getSymlinkTarget()
-
getKey
public Integer getKey()
- Specified by:
getKeyin classAOServObject<Integer,DistroFile>
-
getTableID
public Table.TableID getTableID()
- Specified by:
getTableIDin classAOServObject<Integer,DistroFile>
-
hashCode
public int hashCode()
Description copied from class:AOServObjectImplementation Note:
This default implementation callsAOServObject.hashCode()on the key (fromAOServObject.getKey()).- Overrides:
hashCodein classAOServObject<Integer,DistroFile>
-
init
public void init(ResultSet result) throws SQLException
Description copied from class:AOServObjectInitializes this object from the raw database contents.- Specified by:
initin classAOServObject<Integer,DistroFile>- Parameters:
result- theResultSetcontaining the row to copy into this object- Throws:
SQLException
-
read
public void read(StreamableInput in, AoservProtocol.Version protocolVersion) throws IOException
- Specified by:
readin interfaceAOServReadable- Specified by:
readin interfaceAOServStreamable- Specified by:
readin classAOServObject<Integer,DistroFile>- Throws:
IOException
-
readRecord
public void readRecord(DataInputStream in) throws IOException
- Specified by:
readRecordin interfaceFileListObject- Specified by:
readRecordin classFilesystemCachedObject<Integer,DistroFile>- Throws:
IOException
-
write
public void write(StreamableOutput out, AoservProtocol.Version protocolVersion) throws IOException
- Specified by:
writein interfaceAOServStreamable- Specified by:
writein interfaceAOServWritable- Specified by:
writein classAOServObject<Integer,DistroFile>- Throws:
IOException
-
writeRecord
public void writeRecord(DataOutputStream out) throws IOException
- Specified by:
writeRecordin interfaceFileListObject- Specified by:
writeRecordin classFilesystemCachedObject<Integer,DistroFile>- Throws:
IOException
-
-