Class AttributeLine


  • public class AttributeLine
    extends SingleLine
    The attribute definition line.

    An attribute line is defined as follows:

     javaType[<innerType>][(size[,scale])] javaName columnName [comment] [\[options\]]
     
    Where:
    • javaType - is the java class name or primitive. Allowed types are:
      • primitives: boolean, byte, char, short, int, long, float, double
      • classes: Boolean, Byte, Character, Short, Integer, Long, Float, Double, BigDecimal, BMoney, DMoney, Binary, Date, Time, Timestamp, String
    • innerType: optional inner/generic type
    • size: optional number of columns or width or non-fractional digits if numeric
    • scale: optional scale (numeric types only)
    • javaName: the name used in Java sources (must start lowercase)
    • columnName: the database column name
    • comment: the optional comment
    • [options]: the options enclosed in double quotes. Options beginning with an '@' are treated as annotations

    Examples:

     long             subsidiaryId    subsidiary_id     subsidiary ID [contextid]
     String(10)       invoiceNo       invoice_no        the unique invoice number [uc]
     Date             invoiceDate     invoice_date      the invoice's date
     long             customerId      customer_id       object ID of the customer [uc]
     String(200)      address         address           the address (multiline) [default 'blah']
     DMoney           total           total             sum (without tax)
     DMoney           tax             tax               tax (vat)
     Timestamp        printed         printed           first printed
     Double(10,2)     someDouble      some_double       digits with scale
     MyType<int>      extra           extra             some application specific type
     
    Author:
    harald
    • Constructor Detail

      • AttributeLine

        public AttributeLine​(Document document,
                             int offset,
                             LineType lineType)
        Creates an attribute line.
        This line always spans only one line.
        Parameters:
        document - the whole document
        offset - offset to first character within document
        lineType - the line type