Class MYear

All Implemented Interfaces:
Serializable, Cloneable, Comparator<Object>, I_C_Year, I_Persistent, Evaluatee

public class MYear extends X_C_Year
Year Model
Version:
$Id: MYear.java,v 1.5 2006/10/11 04:12:39 jjanke Exp $
Author:
Jorg Janke, Teo Sarca, www.arhipac.ro
  • BF [ 1761918 ] Error creating periods for a year with per. created partial
  • BF [ 2430755 ] Year Create Periods display proper error message
  • See Also:
    • Constructor Details

      • MYear

        public MYear(Properties ctx, String C_Year_UU, String trxName)
        UUID based Constructor
        Parameters:
        ctx - Context
        C_Year_UU - UUID key
        trxName - Transaction
      • MYear

        public MYear(Properties ctx, int C_Year_ID, String trxName)
        Standard Constructor
        Parameters:
        ctx - context
        C_Year_ID - id
        trxName - transaction
      • MYear

        public MYear(Properties ctx, ResultSet rs, String trxName)
        Load Constructor
        Parameters:
        ctx - context
        rs - result set
        trxName - transaction
      • MYear

        public MYear(MCalendar calendar)
        Parent Constructor
        Parameters:
        calendar - parent
    • Method Details

      • getYearAsInt

        public int getYearAsInt()
        Get Year As Int
        Returns:
        year as int or 0
      • getYY

        public String getYY()
        Get last two characters of year
        Returns:
        01
      • toString

        public String toString()
        String Representation
        Overrides:
        toString in class X_C_Year
        Returns:
        info
      • beforeSave

        protected boolean beforeSave(boolean newRecord)
        Description copied from class: PO
        Called before Save for Pre-Save Operation
        Overrides:
        beforeSave in class PO
        Parameters:
        newRecord - new record
        Returns:
        true if record can be saved
      • createStdPeriods

        public void createStdPeriods(Locale locale)
        Create 12 Standard (Jan-Dec) Periods. Creates also Period Control from DocType. see DocumentTypeVerify#createPeriodControls(Properties, int, SvrProcess, String)
        Parameters:
        locale - locale
      • createStdPeriods

        public boolean createStdPeriods(Locale locale, Timestamp startDate, String dateFormat)
        Create 12 Standard Periods from the specified start date. Creates also Period Control from DocType. see DocumentTypeVerify#createPeriodControls(Properties, int, SvrProcess, String)
        Parameters:
        locale - locale
        startDate - first day of the calendar year
        dateFormat - SimpleDateFormat pattern for generating the period names.
        Returns:
        true if created