CUSTOMERS
Repository name :   SampDB1
Repository location : C:\Versata_55\Samples\SampDB1
Analysis date :   Tue Sep 16 16:10:05 PDT 2003
Analysis run on machine : TYLER_DELL
Analysis run by user : Tyler
DataObject Name : CUSTOMERS
Description : This is a list of all customers for the company.
Attributes Caption Nullability Persistent DataType Business Rule
Name Customer Name Required Persistent VarChar(50) None()
ActBalance Balance Optional Persistent Currency Sum(hasOrders(ORDERS), OrderTotal, RepositoryName = SampDB1 and AttrName = ActBalance and DataObjectName = CUSTOMERS)
TotalSales Total Sales Optional Persistent Currency Sum(hasOrders(ORDERS), OrderTotal, RepositoryName = SampDB1 and AttrName = TotalSales and DataObjectName = CUSTOMERS)
SumAutoBucksEarned Auto Bucks Earned Optional Persistent Currency Sum(hasOrders(ORDERS), SumAutoBucksEarned, RepositoryName = SampDB1 and AttrName = SumAutoBucksEarned and DataObjectName = CUSTOMERS)
SumAutoBucksUsed Auto Bucks Used Optional Persistent Currency Sum(hasOrders(ORDERS), AutoBucksUsed, RepositoryName = SampDB1 and AttrName = SumAutoBucksUsed and DataObjectName = CUSTOMERS)
CustNum Cust# Required Persistent AutoNumber
CreditCode Credit Code Optional Persistent Integer Default( 2 )
CreditLimit Credit Limit Optional Persistent Currency Formula(if ( (Updating and CreditLimit = :Old.CreditLimit ) OR CreditLimit IS NULL ) AND (Inserting OR ( ( :Old.MaxCreditLimit != MaxCreditLimit ) AND ( :Old.MaxCreditLimit = CreditLimit ) ) ) then $value = MaxCreditLimitEnd If)
State State Optional Persistent VarChar(12) CodedValueList( VALID_STATE )
IsOnHold On Hold Optional Persistent Boolean Default(False)
MaxCreditLimit Max Credit Optional Persistent Currency ParentReplicate(CodeTableCredit(VALID_CREDIT), creditMaxBalance, Maintained)
Street Street Optional Persistent VarChar(32) Default(' ')
City City Optional Persistent VarChar(24)
ZIP Post Code Optional Persistent Long
Photo Photo Optional Persistent VarChar(30)
NumOrdersPaid # Orders Paid Optional Persistent Integer Count(hasOrders(ORDERS), RepositoryName = SampDB1 and AttrName = NumOrdersPaid and DataObjectName = CUSTOMERS)
NumOrdersUnpaid # Orders Unpaid Optional Persistent Integer Count(hasOrders(ORDERS), RepositoryName = SampDB1 and AttrName = NumOrdersUnpaid and DataObjectName = CUSTOMERS)
LastOrderNum LastOrderNum Optional Persistent Long None()
Constraints When Constraint Error Message
AutoBucksExceeded RejectWhen SumAutoBucksUsed > SumAutoBucksEarned Sorry, this exceeds Auto Bucks Earned (buy more stuff!)
BalanceExceeded RejectWhen ActBalance > CreditLimit /* Rules can have cascade dependencies... -- the CredtLimit is entered by the End User, but... -- see the Column Derivation rule for ActBalance */ Sorry - Customer Balance exceeds Credit Limit
ExceededMaxLimit AcceptWhen CreditLimit <= MaxCreditLimit or ( :Old.CreditLimit = CreditLimit and :Old.MaxCreditLimit = CreditLimit) Credit limit too high for the credit code
PreventDeletesIfOnHold RejectWhen (deleting and :old.IsOnHold = true) Customer delete is rejected because the customer is on Hold status.
PreventOrderIfOnHold RejectWhen (NumOrdersUnpaid > :old.NumOrdersUnpaid and IsOnHold = true) /* Note: This will allow a prepaid order to be entered and/or shipped, even if customer is still on hold. Very valuble during a backrupcy proceeding against a customer. */ Customer is currently on hold, so new orders are rejected
UnlikelyStreet RejectWhen isCurrentEvent('CUSTOMER_Warning') = false AND Street = '1 Elm' Warning: that is an unlikely street address - press Save to continue, or Undo to cancel
Event Condition Action Condition Action
Parent Relationships Parent Child Enforced
CUSTOMERS_JN_CUSTOMER_USER CUSTOMERS (CustomerAccount) CUSTOMER_USER (Users) Enforced
CUSTOMERS_JN_ORDERS CUSTOMERS (placedByCustomer) ORDERS (hasOrders) Enforced
Child Relationships Child Parent Enforced
VALID_CREDIT_JN_CUSTOMERS CUSTOMERS (Customers) VALID_CREDIT (CodeTableCredit) Enforced
Indexes
CityIndex City ||
User Defined Methods Method Signature
beforeDelete public void SampDB1.CUSTOMERSImpl.beforeDelete(versata.vls.DataObject,versata.vls.Response)
addListeners public void SampDB1.CUSTOMERSImpl.addListeners()
getNewObject public static SampDB1.CUSTOMERSImpl SampDB1.CUSTOMERSImpl.getNewObject(versata.vls.Session,boolean)
beforeCommit public void SampDB1.CUSTOMERSImpl.beforeCommit(versata.vls.Session,versata.vls.Response)
Used By Used In
CustQueryVirtuals QUERY
OrderJoinSalesRepCust QUERY
StateWideBalance QUERY
CUSTOMERS FORM Basic_HTML:pCUSTOMERSQBF
CUSTOMERS FORM Basic_HTML:pCUSTOMERMenuList
CUSTOMERS FORM Basic_HTML:pCUSTOMER_Orders
CUSTOMERS FORM Business_Change:pCUSTOMERS_Grid
CUSTOMERS FORM Business_Change:pCUSTOMERS
CUSTOMERS FORM Controls_Tree:pCUSTOMERS
CUSTOMERS FORM Events_Actions:pCUSTOMERS
CUSTOMERS FORM Events_DataSource:pCUSTOMERS
CUSTOMERS FORM Events_DataSource:pAddCustomer
CUSTOMERS FORM Events_DataSource:pCUSTOMERS_Grid
CUSTOMERS FORM Events_Tracing:pCUSTOMERS
CUSTOMERS FORM Frames_Multiple:pCUSTOMERS
CUSTOMERS FORM GridDisplayForm:pCUSTOMERS
CUSTOMERS FORM HTML_Mail:pCUSTOMERS
CUSTOMERS FORM HTML_Mail:pCUSTOMERS2
CUSTOMERS FORM Recompute_Derivations:pCUSTOMERS
CUSTOMERS FORM ShoppingCart:pCUSTOMERS
CUSTOMERS FORM Show_Dialog:pCUSTOMERS
CUSTOMERS FORM Suppress_Login:pCUSTOMERS
CUSTOMERS FORM PDX_Basic_HTML:pCustomerList
CUSTOMERS FORM PDX_Basic_HTML:pCustomerOrders
CUSTOMERS FORM PDX_Basic_HTML:pCustomerOrders
CUSTOMERS FORM PDX_Basic_HTML:pEditCustomer
CUSTOMERS FORM PDX_Basic_HTML:pCustomerPick
CUSTOMERS FORM Automation_Demo:pCUSTOMERSQBF
CUSTOMERS FORM Automation_Demo:pCUSTOMERMenuList
CUSTOMERS FORM Automation_Demo:pCUSTOMER_Orders
CUSTOMERS FORM Automation_Demo:pCUSTOMER_Orders
CUSTOMERS FORM Automation_Demo:pCUSTOMER_Orders
CUSTOMERS FORM Automation_Demo:pCUSTOMERS
CUSTOMERS FORM PDX_Basic_Layout:pCUSTOMERS
CUSTOMERS FORM PDX_Cascading_Picks:pCUSTOMERS
CUSTOMERS FORM PDX_Conditional_Branching:pCUSTOMERS_Grid
CUSTOMERS FORM PDX_Inclusion:pCUSTOMERS_Grid
CUSTOMERS FORM PDX_Inclusion:pCUSTOMERS
CUSTOMERS FORM PDX_Menu_Tabs:pCUSTOMERS
CUSTOMERS FORM PDX_Return_Command:gsCUSTOMERS
CUSTOMERS FORM PDX_Return_Command:pCUSTOMERS
CUSTOMERS FORM PDX_Return_Command:pCUSTOMERS_ORDERS
CUSTOMERS FORM SortCombo:pCUSTOMERS
CUSTOMERS FORM SortCombo:pCUSTOMERS5_Grid
CUSTOMERS FORM SortCombo:pCUSTOMERS8
CUSTOMERS FORM _Demo:CUSTOMERS_Grid
CUSTOMERS FORM _Demo:CUSTOMER
CUSTOMERS FORM _Transitions:CUSTOMER
CUSTOMERS FORM _Transitions:CUSTOMERS_Grid
CUSTOMERS FORM Client_Custom_Login:Customers
CUSTOMERS FORM Client_Share_Form:fCUSTOMERS
CUSTOMERS FORM Client_Share_Form:fCUSTOMER
CUSTOMERS FORM Client_Subclass_ContainerEvents:fCUSTOMERS
CUSTOMERS FORM Client_Subclass_GridDoubleClick:fCUSTOMERS_Grid
CUSTOMERS FORM Client_Subclass_GridDoubleClick:fCUSTOMERS
CUSTOMERS FORM Client_Subclass_MenuTree:fCUSTOMERTREE
CUSTOMERS FORM Client_Subclass_TextBox:CUSTOMERS
CUSTOMERS FORM Client_Subclass_WarningMessages:CUSTOMERS
CUSTOMERS FORM Client_Tree_Customers:CustomersSearch
CUSTOMERS FORM Client_Tree_Customers:CustOrdersInTree
CUSTOMERS FORM Layout_Managers:fCUSTOMERS
CUSTOMERS FORM Layout_Managers:fCUSTOMERS2
CUSTOMERS FORM MDI_Application:fCUSTOMERS
CUSTOMERS FORM Server_Extended_Rules_Mods:CUSTOMERS
CUSTOMERS FORM VFC_Swing_Controls:demoVSSplitPane
CUSTOMERS FORM VFC_Swing_Controls:demoVSGridTree
CUSTOMERS FORM VFC_Swing_Controls:demoAutomaticQuery
CUSTOMERS FORM VFC_Swing_Controls:demoChoiceEdit
CUSTOMERS FORM VFC_Swing_Controls:demoSwingBean
CUSTOMERS FORM VFC_Swing_Controls:demoVSScrollPane