示例#1
0
 /** Crea una pagina vuota */
 public static Page factoryNewPageBuilder() {
   Date mDate = new Date();
   SimpleDateFormat oDateFormat = new SimpleDateFormat("yyyyMMddHHmmssSSS");
   long mPageID = 0;
   try {
     mPageID = Long.parseLong(oDateFormat.format(mDate));
   } catch (NumberFormatException e) {
     mPageID = 0;
   }
   Page mPage = new Page();
   mPage.setPageID(mPageID);
   mPage.setPageDTCreation(new Date());
   mPage.setDiaryImage(newImagesBuilder());
   mPage.setPageRows(newRowsBuilder());
   return mPage;
 }
示例#2
0
  /**
   * inizializza una pagina vuota del Nuovo Diario
   *
   * <p>*
   */
  private static Hashtable<Long, Page> newPagesBuilder() {
    Date mDate = new Date();
    SimpleDateFormat oDateFormat = new SimpleDateFormat("yyyyMMddHHmmssSSS");
    long mPageID = 0;
    try {
      mPageID = Long.parseLong(oDateFormat.format(mDate));
    } catch (NumberFormatException e) {
      mPageID = 0;
    }
    Hashtable<Long, Page> mPages = new Hashtable<Long, Page>();
    Page mPage = new Page();
    mPage.setDiaryID(mCurrentDiary.getDiaryID());
    mPage.setPageID(mPageID);
    mPage.setPageDTCreation(new Date());
    mPage.setPageNumber(1);
    mPage.setDiaryImage(newImagesBuilder());
    mPage.setPageRows(newRowsBuilder());

    mPages.put(mPageID, mPage);

    return mPages;
  }