Skip to main content

This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.Opens in a new tab

For information on migrating to InterSystems IRISOpens in a new tab, see Why Migrate to InterSystems IRIS?

Sample.Vendor

persistent class Sample.Vendor extends %Library.Persistent, %Library.Populate, %XML.Adaptor

SQL Table Name: Sample.Vendor

The Vendor class is a persistent class containing vendor information.
This class demonstrates how to use the %CacheSQLStorage storage class to provide custom storage for a persistent class. Typically the %CacheSQLStorage storage class is used to provide object access to previously existing storage structures.

Property Inventory

Properties

property Address as Address (POPSPEC = "##class(Address).PopulateSerial()");
Vendor address.
Property methods: AddressGet(), AddressGetObject(), AddressGetObjectId(), AddressGetSwizzled(), AddressIsEmpty(), AddressIsValid(), AddressNewObject(), AddressSet(), AddressSetObject(), AddressSetObjectId(), AddressUnSwizzle()
property Balance as %Float (MAXVAL = 999999999, MINVAL = -999999999);
Balance.
Property methods: BalanceDisplayToLogical(), BalanceGet(), BalanceIsValid(), BalanceLogicalToDisplay(), BalanceNormalize(), BalanceSet(), BalanceXSDToLogical()
property Contact as %String (POPSPEC = "Name()");
Name of primary vendor contact.
Property methods: ContactDisplayToLogical(), ContactGet(), ContactIsValid(), ContactLogicalToDisplay(), ContactLogicalToOdbc(), ContactNormalize(), ContactSet()
property DaysClear as %Integer (MAXVAL = 999, MINVAL = 0);
Days clear.
Property methods: DaysClearDisplayToLogical(), DaysClearGet(), DaysClearIsValid(), DaysClearLogicalToDisplay(), DaysClearNormalize(), DaysClearSet(), DaysClearXSDToLogical()
property DiscDays as %Integer (MAXVAL = 999, MINVAL = 0);
Discount days.
Property methods: DiscDaysDisplayToLogical(), DiscDaysGet(), DiscDaysIsValid(), DiscDaysLogicalToDisplay(), DiscDaysNormalize(), DiscDaysSet(), DiscDaysXSDToLogical()
property DiscRate as %Float (MAXVAL = 100, MINVAL = 0);
Discount rate.
Property methods: DiscRateDisplayToLogical(), DiscRateGet(), DiscRateIsValid(), DiscRateLogicalToDisplay(), DiscRateNormalize(), DiscRateSet(), DiscRateXSDToLogical()
property LastInvDate as %Date);
Last Invoice Date.
Property methods: LastInvDateDisplayToLogical(), LastInvDateGet(), LastInvDateIsValid(), LastInvDateLogicalToDisplay(), LastInvDateLogicalToOdbc(), LastInvDateLogicalToXSD(), LastInvDateNormalize(), LastInvDateOdbcToLogical(), LastInvDateSet(), LastInvDateXSDToLogical()
property LastPayDate as %Date);
Last Payment Date.
Property methods: LastPayDateDisplayToLogical(), LastPayDateGet(), LastPayDateIsValid(), LastPayDateLogicalToDisplay(), LastPayDateLogicalToOdbc(), LastPayDateLogicalToXSD(), LastPayDateNormalize(), LastPayDateOdbcToLogical(), LastPayDateSet(), LastPayDateXSDToLogical()
property MinPayment as %Float (MAXVAL = 999999, MINVAL = 0);
Minimum Payment.
Property methods: MinPaymentDisplayToLogical(), MinPaymentGet(), MinPaymentIsValid(), MinPaymentLogicalToDisplay(), MinPaymentNormalize(), MinPaymentSet(), MinPaymentXSDToLogical()
property Name as %String (POPSPEC = "Company()");
Vendor name.
Property methods: NameDisplayToLogical(), NameGet(), NameIsValid(), NameLogicalToDisplay(), NameLogicalToOdbc(), NameNormalize(), NameSet()
property NetDays as %Integer (MAXVAL = 999, MINVAL = 0);
Net days.
Property methods: NetDaysDisplayToLogical(), NetDaysGet(), NetDaysIsValid(), NetDaysLogicalToDisplay(), NetDaysNormalize(), NetDaysSet(), NetDaysXSDToLogical()
property PayFlag as %String (DISPLAYLIST = ",Never,Minimum", VALUELIST = ",N,M");
Payment Flag
Property methods: PayFlagDisplayToLogical(), PayFlagGet(), PayFlagIsValid(), PayFlagLogicalToDisplay(), PayFlagLogicalToOdbc(), PayFlagNormalize(), PayFlagSet()
property TaxReporting as %String (DISPLAYLIST = ",Exempt,Required", VALUELIST = ",E,");
Vendor tax reporting status.
Property methods: TaxReportingDisplayToLogical(), TaxReportingGet(), TaxReportingIsValid(), TaxReportingLogicalToDisplay(), TaxReportingLogicalToOdbc(), TaxReportingNormalize(), TaxReportingSet()

Indexes

index (IDKEY on ) [IdKey, Type = key];
Index methods: IDKEYCheck(), IDKEYDelete(), IDKEYExists(), IDKEYOpen(), IDKEYSQLCheckUnique(), IDKEYSQLExists(), IDKEYSQLFindPKeyByConstraint(), IDKEYSQLFindRowIDByConstraint()
index (IndexNName on Name);
Name Index
Index methods: IndexNNameExists()

Inherited Members

Inherited Methods

Storage

Storage Model: CacheSQLStorage

Maps: 2

  • Map number 1 is named DataMasterMap

    thismap.Global: ^VendorData

  • Map number 2 is named IndexNName

    thismap.Global: ^VendorIndex

  • ^VendorData({Vendor})
    =
    Node Delimiter Piece Name
    1 Name
    2 Address
    3 Contact
    4 DiscRate
    5 DiscDays
    6 NetDays
    7 DaysClear
    8 PayFlag
    9 MinPayment
    10 TaxReporting
    1 1 LastInvDate
    1 2 LastPayDate
    1 3 Balance
    ^VendorIndex("N",$$SQLUPPER({Name}),{Vendor})
    =
FeedbackOpens in a new tab