- java.lang.Object
-
- com.aoindustries.aoserv.client.AOServObject<K,T>
-
- com.aoindustries.aoserv.client.CachedObject<Integer,V>
-
- com.aoindustries.aoserv.client.CachedObjectIntegerKey<Ticket>
-
- com.aoindustries.aoserv.client.ticket.Ticket
-
- All Implemented Interfaces:
Streamable,StreamReadable,StreamWritable,Row,AOServReadable,AOServStreamable,AOServWritable,SingleTableObject<Integer,Ticket>
public final class Ticket extends CachedObjectIntegerKey<Ticket>
TheTicketsystem allows clients to submit support requests and monitor the progress of the work.- Author:
- AO Industries, Inc.
- See Also:
Action,Priority,TicketType
-
-
Field Summary
-
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 Ticket()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactAssignTo(Administrator assignedTo, Administrator business_administrator, String comments)voidactChangeAdminPriority(Priority priority, Administrator business_administrator, String comments)voidactWorkEntry(Administrator administrator, String comments)voidaddAnnotation(String summary, String details)AccountgetAccount()May be null if not set or filtered.Account.NamegetAccount_name()PrioritygetAdminPriority()BrandgetBrand()May be filtered.CategorygetCategory()PrioritygetClientPriority()protected ObjectgetColumnImpl(int i)Set<Email>getContactEmails()StringgetContactPhoneNumbers()AdministratorgetCreatedBy()StringgetDetails()EmailgetFromAddress()StringgetInternalNotes()LanguagegetLanguage()UnmodifiableTimestampgetOpenDate()StringgetRawEmail()ResellergetReseller()May be null when filtered.StatusgetStatus()UnmodifiableTimestampgetStatusTimeout()StringgetSummary()Table.TableIDgetTableID()List<Action>getTicketActions()List<Assignment>getTicketAssignments()intgetTicketID()TicketTypegetTicketType()voidinit(ResultSet result)Initializes this object from the raw database contents.voidread(StreamableInput in, AoservProtocol.Version protocolVersion)booleansetAccount(Account oldAccount, Account newAccount)Updates the ticket business if the old business matches the current value.voidsetClientPriority(Priority clientPriority)voidsetContactEmails(Set<Email> contactEmails)voidsetContactPhoneNumbers(String contactPhoneNumbers)booleansetInternalNotes(String oldInternalNotes, String newInternalNotes)Updates the internal notes if the old value matches the current value.booleansetStatus(Status oldStatus, Status newStatus, long statusTimeout)Updates the ticket status if the old status matches the current value.voidsetSummary(String summary)booleansetTicketType(TicketType oldType, TicketType newType)Updates the ticket type if the old value matches the current value.StringtoStringImpl()AOServObject.toString()implementation that is allowed to throw exceptions.voidwrite(StreamableOutput out, AoservProtocol.Version protocolVersion)-
Methods inherited from class com.aoindustries.aoserv.client.CachedObjectIntegerKey
equals, getKey, getPkey, hashCode
-
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
-
-
-
-
Method Detail
-
toStringImpl
public String toStringImpl()
Description copied from class:AOServObjectAOServObject.toString()implementation that is allowed to throw exceptions.Implementation Note:
This default implementation callsAOServObject.toString()on the key (fromAOServObject.getKey()). When the key isnull, uses the default implementation fromObject.toString().- Overrides:
toStringImplin classCachedObjectIntegerKey<Ticket>
-
getColumnImpl
protected Object getColumnImpl(int i) throws IOException, SQLException
- Specified by:
getColumnImplin classAOServObject<Integer,Ticket>- Throws:
IOExceptionSQLException
-
getTableID
public Table.TableID getTableID()
- Specified by:
getTableIDin classAOServObject<Integer,Ticket>
-
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,Ticket>- 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,Ticket>- 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,Ticket>- Throws:
IOException
-
getTicketID
public int getTicketID()
-
getBrand
public Brand getBrand() throws IOException, SQLException
May be filtered.- Throws:
IOExceptionSQLException
-
getReseller
public Reseller getReseller() throws SQLException, IOException
May be null when filtered.- Throws:
SQLExceptionIOException
-
getAccount_name
public Account.Name getAccount_name()
-
getAccount
public Account getAccount() throws SQLException, IOException
May be null if not set or filtered.- Throws:
SQLExceptionIOException
-
getLanguage
public Language getLanguage() throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
getCreatedBy
public Administrator getCreatedBy() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getCategory
public Category getCategory() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getTicketType
public TicketType getTicketType() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getFromAddress
public Email getFromAddress()
-
getSummary
public String getSummary()
-
getDetails
public String getDetails() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getRawEmail
public String getRawEmail() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getOpenDate
public UnmodifiableTimestamp getOpenDate()
-
getClientPriority
public Priority getClientPriority() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getAdminPriority
public Priority getAdminPriority() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getStatus
public Status getStatus() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getStatusTimeout
public UnmodifiableTimestamp getStatusTimeout()
-
getContactPhoneNumbers
public String getContactPhoneNumbers()
-
getInternalNotes
public String getInternalNotes() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getTicketActions
public List<Action> getTicketActions() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getTicketAssignments
public List<Assignment> getTicketAssignments() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
actChangeAdminPriority
public void actChangeAdminPriority(Priority priority, Administrator business_administrator, String comments) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
setClientPriority
public void setClientPriority(Priority clientPriority) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
setSummary
public void setSummary(String summary) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
addAnnotation
public void addAnnotation(String summary, String details) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
actAssignTo
public void actAssignTo(Administrator assignedTo, Administrator business_administrator, String comments) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
setContactEmails
public void setContactEmails(Set<Email> contactEmails) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
setContactPhoneNumbers
public void setContactPhoneNumbers(String contactPhoneNumbers) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
actWorkEntry
public void actWorkEntry(Administrator administrator, String comments) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
setAccount
public boolean setAccount(Account oldAccount, Account newAccount) throws IOException, SQLException
Updates the ticket business if the old business matches the current value.- Returns:
trueif successfully updated orfalseif oldAccount doesn't match the current business.- Throws:
IOExceptionSQLException
-
setTicketType
public boolean setTicketType(TicketType oldType, TicketType newType) throws IOException, SQLException
Updates the ticket type if the old value matches the current value.- Returns:
trueif successfully updated orfalseif oldType doesn't match the current type.- Throws:
IOExceptionSQLException
-
setStatus
public boolean setStatus(Status oldStatus, Status newStatus, long statusTimeout) throws IOException, SQLException
Updates the ticket status if the old status matches the current value.- Returns:
trueif successfully updated orfalseif oldStatus doesn't match the current status.- Throws:
IOExceptionSQLException
-
setInternalNotes
public boolean setInternalNotes(String oldInternalNotes, String newInternalNotes) throws IOException, SQLException
Updates the internal notes if the old value matches the current value.- Returns:
trueif successfully updated orfalseif oldInternalNotes doesn't match the current internal notes.- Throws:
IOExceptionSQLException
-
-