ibspan.ecap.merchant.shopdecisions.dataaccess
Class DateEntity

java.lang.Object
  extended by ibspan.ecap.merchant.shopdecisions.dataaccess.DateEntity

public class DateEntity
extends java.lang.Object

A class representing a date dimension entity.

Author:
Micha³ Drozdowicz

Constructor Summary
DateEntity(java.util.Date fullDate, java.lang.String dayOfWeek, int dayNoInWeek, int dayInEpoch, int weekInEpoch, int monthInEpoch, int dayInYear, int weekInYear, int monthInYear, int quarterInYear, int year, int dayInMonth, java.lang.String weekdayIndicator)
          Creates a new instance of DateEntity.
 
Method Summary
 int getDayInEpoch()
          Gets the number of day in epoch (since 01.01.1970).
 int getDayInMonth()
          Gets the day number in month
 int getDayInYear()
          Gets the number of the day in year.
 int getDayNoInWeek()
          Gets the number of day in a week (1-7).
 java.lang.String getDayOfWeek()
          Gets the name of the day of week.
 java.util.Date getFullDate()
          Gets the full date.
 int getMonthInEpoch()
          Gets the number of the month in epoch (since 01.01.1970).
 int getMonthInYear()
          Gets the number of the month in year.
 int getQuarterInYear()
          Gets the quarter number in year.
 java.lang.String getWeekdayIndicator()
          Gets the weekday indicator.
 int getWeekInEpoch()
          Gets the number of week in epoch (since 01.01.1970).
 int getWeekInYear()
          Get the week number in year.
 int getYear()
          Gets the year number AD.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateEntity

public DateEntity(java.util.Date fullDate,
                  java.lang.String dayOfWeek,
                  int dayNoInWeek,
                  int dayInEpoch,
                  int weekInEpoch,
                  int monthInEpoch,
                  int dayInYear,
                  int weekInYear,
                  int monthInYear,
                  int quarterInYear,
                  int year,
                  int dayInMonth,
                  java.lang.String weekdayIndicator)
Creates a new instance of DateEntity.

Parameters:
fullDate - the full date.
dayOfWeek - the name of the day of week. Can equal any of the following: Monday Tuesday Wednesday Thursday Friday Saturday Sunday
dayNoInWeek - the number of the day in a week.
dayInEpoch - the number of the day in epoch (since 01.01.1970).
weekInEpoch - the number of the week in epoch (since 01.01.1970).
monthInEpoch - the number of the month in epoch (since 01.01.1970).
dayInYear - the number of the day in year.
weekInYear - the number of the week in year.
monthInYear - the number of the month in year.
quarterInYear - the number of the quarter in year.
year - the year number AD.
dayInMonth - the day number in month.
weekdayIndicator - the weekday indicator. Takes a value of 'Weekday' or 'Weekend'.
Method Detail

getDayInEpoch

public int getDayInEpoch()
Gets the number of day in epoch (since 01.01.1970).

Returns:
the number of day in epoch (since 01.01.1970).

getDayInMonth

public int getDayInMonth()
Gets the day number in month

Returns:
the day number in month.

getDayInYear

public int getDayInYear()
Gets the number of the day in year.

Returns:
the number of the day in year.

getDayNoInWeek

public int getDayNoInWeek()
Gets the number of day in a week (1-7).

Returns:
the number of day in a week (1-7).

getDayOfWeek

public java.lang.String getDayOfWeek()
Gets the name of the day of week. Can equal any of the following: Monday Tuesday Wednesday Thursday Friday Saturday Sunday

Returns:
the name of the day of week.

getFullDate

public java.util.Date getFullDate()
Gets the full date.

Returns:
the full date.

getMonthInEpoch

public int getMonthInEpoch()
Gets the number of the month in epoch (since 01.01.1970).

Returns:
the number of the month in epoch (since 01.01.1970)

getMonthInYear

public int getMonthInYear()
Gets the number of the month in year.

Returns:
the number of the month in year.

getQuarterInYear

public int getQuarterInYear()
Gets the quarter number in year.

Returns:
the quarter number in year.

getWeekdayIndicator

public java.lang.String getWeekdayIndicator()
Gets the weekday indicator. Takes a value of 'Weekday' or 'Weekend'.

Returns:
the weekday indicator.

getWeekInEpoch

public int getWeekInEpoch()
Gets the number of week in epoch (since 01.01.1970).

Returns:
returns the number of the week since 01.01.1970

getWeekInYear

public int getWeekInYear()
Get the week number in year.

Returns:
the week number in year.

getYear

public int getYear()
Gets the year number AD.

Returns:
the year number AD.