Class PackageDefinitionLimit
- java.lang.Object
-
- com.aoindustries.aoserv.client.AOServObject<K,T>
-
- com.aoindustries.aoserv.client.CachedObject<Integer,V>
-
- com.aoindustries.aoserv.client.CachedObjectIntegerKey<PackageDefinitionLimit>
-
- com.aoindustries.aoserv.client.billing.PackageDefinitionLimit
-
- All Implemented Interfaces:
Streamable,StreamReadable,StreamWritable,Row,AOServReadable,AOServStreamable,AOServWritable,SingleTableObject<Integer,PackageDefinitionLimit>
public final class PackageDefinitionLimit extends CachedObjectIntegerKey<PackageDefinitionLimit>
APackageDefinitionLimitstores one limit that is part of aPackageDefinition.- Author:
- AO Industries, Inc.
- See Also:
PackageDefinition
-
-
Field Summary
Fields Modifier and Type Field Description static intUNLIMITEDIndicates a particular value is unlimited.-
Fields inherited from class com.aoindustries.aoserv.client.CachedObjectIntegerKey
pkey
-
Fields inherited from class com.aoindustries.aoserv.client.CachedObject
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 PackageDefinitionLimit()PackageDefinitionLimit(PackageDefinition package_definition, Resource resource, int soft_limit, int hard_limit, Money additionalRate, TransactionType additional_transaction_type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MoneygetAdditionalRate()Gets the additional rate ornullif there is none.StringgetAdditionalRatePerUnit()Gets the additional rate per unit ornullif there is none.TransactionTypegetAdditionalTransactionType()StringgetAdditionalTransactionType_name()protected ObjectgetColumnImpl(int i)intgetHardLimit()Gets the hard limit ornullof there is none.StringgetHardLimitDisplayUnit()Gets the hard limit and unit ornullif there is none.PackageDefinitiongetPackageDefinition()intgetPackageDefinition_id()ResourcegetResource()StringgetResource_name()intgetSoftLimit()Gets the soft limit ornullof there is none.StringgetSoftLimitDisplayUnit()Gets the soft limit and unit ornullif there is none.Table.TableIDgetTableID()voidinit(ResultSet result)Initializes this object from the raw database contents.voidread(StreamableInput in, AoservProtocol.Version protocolVersion)voidwrite(StreamableOutput out, AoservProtocol.Version protocolVersion)-
Methods inherited from class com.aoindustries.aoserv.client.CachedObjectIntegerKey
equals, getKey, getPkey, hashCode, toStringImpl
-
Methods inherited from class com.aoindustries.aoserv.client.CachedObject
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, write
-
-
-
-
Field Detail
-
UNLIMITED
public static final int UNLIMITED
Indicates a particular value is unlimited.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PackageDefinitionLimit
public PackageDefinitionLimit()
-
PackageDefinitionLimit
public PackageDefinitionLimit(PackageDefinition package_definition, Resource resource, int soft_limit, int hard_limit, Money additionalRate, TransactionType additional_transaction_type)
-
-
Method Detail
-
getColumnImpl
protected Object getColumnImpl(int i)
- Specified by:
getColumnImplin classAOServObject<Integer,PackageDefinitionLimit>
-
getPackageDefinition_id
public int getPackageDefinition_id()
-
getPackageDefinition
public PackageDefinition getPackageDefinition() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getResource_name
public String getResource_name()
-
getResource
public Resource getResource() throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
getSoftLimit
public int getSoftLimit()
Gets the soft limit ornullof there is none.
-
getSoftLimitDisplayUnit
public String getSoftLimitDisplayUnit() throws IOException, SQLException
Gets the soft limit and unit ornullif there is none.- Throws:
IOExceptionSQLException
-
getHardLimit
public int getHardLimit()
Gets the hard limit ornullof there is none.
-
getHardLimitDisplayUnit
public String getHardLimitDisplayUnit() throws IOException, SQLException
Gets the hard limit and unit ornullif there is none.- Throws:
IOExceptionSQLException
-
getAdditionalRate
public Money getAdditionalRate()
Gets the additional rate ornullif there is none.
-
getAdditionalRatePerUnit
public String getAdditionalRatePerUnit() throws IOException, SQLException
Gets the additional rate per unit ornullif there is none.- Throws:
IOExceptionSQLException
-
getAdditionalTransactionType_name
public String getAdditionalTransactionType_name()
-
getAdditionalTransactionType
public TransactionType getAdditionalTransactionType() throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
getTableID
public Table.TableID getTableID()
- Specified by:
getTableIDin classAOServObject<Integer,PackageDefinitionLimit>
-
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,PackageDefinitionLimit>- 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,PackageDefinitionLimit>- 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,PackageDefinitionLimit>- Throws:
IOException
-
-