psdi.mbo

Class GLFormat

  • java.lang.Object
    • psdi.mbo.GLFormat
  • All Implemented Interfaces:
    java.io.Serializable


    public class GLFormat
    extends java.lang.Object
    implements java.io.Serializable
    Used to convert GL accounts to segments and segments to Strings. A GL Account maybe fully specified or not, If it is fully specifed, all required segments must be filled in.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      GLFormat(java.lang.String value)
      Deprecated.  
      GLFormat(java.lang.String[] segs)
      Create a GL Formatter with the specified segments
      GLFormat(java.lang.String[] segs, java.lang.String orgId)
      Create a GL Formatter with the specified segments
      GLFormat(java.lang.String value, boolean full)
      Deprecated.  
      GLFormat(java.lang.String value, boolean full, java.lang.String orgId)
      Construct a formatter for the given value and indicate of it is fully specified If a GLFormat object has not previously been initialized on the same Java VM, using the int() method,then a default formatter will be created.
      GLFormat(java.lang.String value, java.lang.String orgId)
      Create a GL Formatter that is NOT fully specified
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String checkType(int segno, java.lang.String val)
      Check the type of the segment to make sure it is OK !
      java.lang.String getPlaceHolder()
      Return the place holder character used for unspecified segments.
      static boolean getPropertyAsBoolean(java.sql.Connection con, java.lang.String name)
      Return a property as a boolean
      char getScreenDelimiter(int segno)
      What is the delimiter used to display after the specifed segment number.
      int getSegmentCount()
      How many segments are there in the GL Account ?
      int getSegmentLength(int segno)
      Return the length of a specified segment.
      java.lang.String getSegmentName(int segno)
      Return the name of the segment as defined by the user.
      java.lang.String[] getSegments()
      Return the segments of the account
      int getSegmentType(int segno)
      Return the type of the specified segment.
      boolean isFullySpecified()
      Does the code need to be fully specified ?
      boolean isSegmentRequired(int segno)
      Is the specified segment required ?
      void mergeString(java.lang.String val)
      Merge the specified string with the current value The current value of the account has highest priority, and the passed in string will be used to fill in any non specified values
      java.lang.String segmentPlaceHolder(int segno)
      Return a string of place holders the length of the specified segment
      java.lang.String toDisplayString()
      Convert segments to a string for display on screen
      java.lang.String toQueryString()
      Returns a string that can be used to in an SQL database to validate the componenets that have been entered so far.
      java.lang.String toStorageString()
      Convert segments to a string for storage in the database
      java.lang.String toString()
      Convert segments to a string.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • GLFormat

        public GLFormat(java.lang.String value,
                        boolean full,
                        java.lang.String orgId)
                 throws MXException,
                        java.rmi.RemoteException
        Construct a formatter for the given value and indicate of it is fully specified If a GLFormat object has not previously been initialized on the same Java VM, using the int() method,then a default formatter will be created.
        Parameters:
        value -
        full -
        userinfo -
        Throws:
        MXException
        java.rmi.RemoteException
      • GLFormat

        public GLFormat(java.lang.String value,
                        java.lang.String orgId)
                 throws MXException,
                        java.rmi.RemoteException
        Create a GL Formatter that is NOT fully specified
        Throws:
        MXException
        java.rmi.RemoteException
      • GLFormat

        public GLFormat(java.lang.String[] segs)
                 throws MXException
        Create a GL Formatter with the specified segments
        Throws:
        MXException
      • GLFormat

        public GLFormat(java.lang.String[] segs,
                        java.lang.String orgId)
                 throws MXException
        Create a GL Formatter with the specified segments
        Throws:
        MXException
    • Method Detail

      • getSegments

        public java.lang.String[] getSegments()
        Return the segments of the account
      • segmentPlaceHolder

        public java.lang.String segmentPlaceHolder(int segno)
        Return a string of place holders the length of the specified segment
      • toQueryString

        public java.lang.String toQueryString()
        Returns a string that can be used to in an SQL database to validate the componenets that have been entered so far. the combination of a search using this string, and a check to see if the code is fully specified will tell you if the GL account is valid.
      • toDisplayString

        public java.lang.String toDisplayString()
        Convert segments to a string for display on screen
      • toString

        public java.lang.String toString()
        Convert segments to a string. Parameters specify if delimiters are added, and if the optional segments are displayed.
        Overrides:
        toString in class java.lang.Object
      • toStorageString

        public java.lang.String toStorageString()
        Convert segments to a string for storage in the database
      • mergeString

        public void mergeString(java.lang.String val)
                         throws MXApplicationException
        Merge the specified string with the current value The current value of the account has highest priority, and the passed in string will be used to fill in any non specified values
        Throws:
        MXApplicationException
      • getSegmentCount

        public int getSegmentCount()
        How many segments are there in the GL Account ?
      • getSegmentName

        public java.lang.String getSegmentName(int segno)
        Return the name of the segment as defined by the user.
      • getSegmentLength

        public int getSegmentLength(int segno)
        Return the length of a specified segment.
      • getSegmentType

        public int getSegmentType(int segno)
        Return the type of the specified segment. The value returned is defined as a set of constants in the MXFormat class.
      • isSegmentRequired

        public boolean isSegmentRequired(int segno)
        Is the specified segment required ?
      • getScreenDelimiter

        public char getScreenDelimiter(int segno)
        What is the delimiter used to display after the specifed segment number. Will return "" if an invalid segment is specified.
      • getPlaceHolder

        public java.lang.String getPlaceHolder()
        Return the place holder character used for unspecified segments.
      • isFullySpecified

        public boolean isFullySpecified()
        Does the code need to be fully specified ?
      • getPropertyAsBoolean

        public static boolean getPropertyAsBoolean(java.sql.Connection con,
                                                   java.lang.String name)
                                            throws MXException
        Return a property as a boolean
        Throws:
        MXException