Class MonthlyChargeTable
- java.lang.Object
-
- com.aoindustries.aoserv.client.AOServTable<K,V>
-
- com.aoindustries.aoserv.client.CachedTable<Integer,V>
-
- com.aoindustries.aoserv.client.CachedTableIntegerKey<MonthlyCharge>
-
- com.aoindustries.aoserv.client.billing.MonthlyChargeTable
-
- All Implemented Interfaces:
Table<MonthlyCharge>,Iterable<MonthlyCharge>
public final class MonthlyChargeTable extends CachedTableIntegerKey<MonthlyCharge>
- Author:
- AO Industries, Inc.
- See Also:
MonthlyCharge
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.aoindustries.aoserv.client.AOServTable
AOServTable.OrderBy
-
-
Field Summary
-
Fields inherited from class com.aoindustries.aoserv.client.AOServTable
ASCENDING, connector, DESCENDING
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MonthlyChargeget(int pkey)protected AOServTable.OrderBy[]getDefaultOrderBy()Gets the default sorting for this table.List<MonthlyCharge>getIndexedRows(int col, Object value)Gets the rows in a more efficient, indexed manner.List<MonthlyCharge>getMonthlyCharges(Account sourceAccount, Account billingAccount)List<MonthlyCharge>getMonthlyCharges(Administrator administrator, Account sourceAccount, Account billingAccount)Gets the list of allmonthly_chargesin the database.List<MonthlyCharge>getRows()Gets the complete list of objects in the table.List<MonthlyCharge>getRowsCopy()Gets a modifiable copy of the rows, which may then be manipulated, such as for sorting.Table.TableIDgetTableID()Gets the unique identifier for this table.-
Methods inherited from class com.aoindustries.aoserv.client.CachedTableIntegerKey
get
-
Methods inherited from class com.aoindustries.aoserv.client.CachedTable
clearCache, getUniqueRowImpl, isLoaded
-
Methods inherited from class com.aoindustries.aoserv.client.AOServTable
addProgressListener, addTableListener, addTableListener, addTableLoadListener, getCachedRowCount, getConnector, getDefaultOrderBySQLExpressions, getIndexedRows, getMap, getNewObject, getObject, getObjects, getObjects, getObjects, getObjectsNoProgress, getObjectsNoProgress, getSize, getSortAlgorithm, getTableName, getTableSchema, getUniqueRow, getUniqueRow, getUniqueRow, getUniqueRow, handleCommand, hasAnyTableListener, hasTableListener, isEmpty, iterator, printTable, removeProgressListener, removeTableListener, removeTableLoadListener, size, sortIfNeeded, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
getDefaultOrderBy
protected AOServTable.OrderBy[] getDefaultOrderBy()
Description copied from class:AOServTableGets the default sorting for this table.- Specified by:
getDefaultOrderByin classAOServTable<Integer,MonthlyCharge>- Returns:
nullif the sorting is performed by the server or the array of column names
-
get
public MonthlyCharge get(int pkey) throws SQLException, IOException
- Specified by:
getin classCachedTableIntegerKey<MonthlyCharge>- Throws:
SQLExceptionIOException- See Also:
CachedTableIntegerKey.get(java.lang.Object)
-
getMonthlyCharges
public List<MonthlyCharge> getMonthlyCharges(Administrator administrator, Account sourceAccount, Account billingAccount) throws IOException, SQLException
Gets the list of allmonthly_chargesin the database. In addition to the monthly charges in the database, the package charges, additional email users, additional ip addresses, and additional shell users are added to the billing.- Returns:
- the
MonthlyChargeobjects. - Throws:
IOExceptionSQLException
-
getMonthlyCharges
public List<MonthlyCharge> getMonthlyCharges(Account sourceAccount, Account billingAccount) throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
getRows
public List<MonthlyCharge> getRows() throws SQLException, IOException
Description copied from class:CachedTableGets the complete list of objects in the table.- Specified by:
getRowsin interfaceTable<MonthlyCharge>- Overrides:
getRowsin classCachedTable<Integer,MonthlyCharge>- Returns:
- a
Listcontaining all of the rows - Throws:
SQLException- if unable to access the databaseIOException- if unable to access the server- See Also:
AOServTable.getRowsCopy()
-
getRowsCopy
public List<MonthlyCharge> getRowsCopy() throws IOException, SQLException
Description copied from class:AOServTableGets a modifiable copy of the rows, which may then be manipulated, such as for sorting.This gives the table implementation a way to create a defensive copy most efficient to its underlying storage mechanism.
Note: It is best to use
AOServTable.getSortAlgorithm()when sorting rows, as the choice of sorting can be very important when objects are pulled from non-heap source like filesystem-based objects. It is very easy for the sort itself to end up pulling all objects into heap.- Overrides:
getRowsCopyin classCachedTable<Integer,MonthlyCharge>- Throws:
IOExceptionSQLException- See Also:
AOServTable.getRows(),AOServTable.getSortAlgorithm()
-
getTableID
public Table.TableID getTableID()
Description copied from class:AOServTableGets the unique identifier for this table. Each table has a unique identifier, as defined inSchemaTable.TableID.- Specified by:
getTableIDin classAOServTable<Integer,MonthlyCharge>- Returns:
- the identifier for this table
- See Also:
Table.TableID
-
getIndexedRows
public List<MonthlyCharge> getIndexedRows(int col, Object value)
Description copied from class:AOServTableGets the rows in a more efficient, indexed manner.Implementation Note:
This default implementation simply throws UnsupportedOperationException.- Overrides:
getIndexedRowsin classCachedTable<Integer,MonthlyCharge>
-
-