Examples of toLong()


Examples of org.apache.wicket.util.string.StringValue.toLong()

        StringValue bookId = parameters.get("bookId");
        if (bookId.isEmpty()) {
           book = new BookTO();
           add(new Label("titleMessage", new Model("Create book")));
        } else {
            book = bookService.findBookById(bookId.toLong());
            add(new Label("titleMessage", new Model("Edit book")));
        }
       
        Form<?> form = new Form("form") {
            @Override
View Full Code Here

Examples of org.apache.wicket.util.string.StringValue.toLong()

       
        // DELETE ITEM
        StringValue bookId = parameters.get("bookId");
        if (!bookId.isEmpty()) {
            BookService bookService = (BookService) ApplicationContextProvider.getApplicationContext().getBean("bookService");
            bookService.deleteBook(bookService.findBookById(bookId.toLong()));
            setResponsePage(ShowAllBook.class);
        }
       
       BookService bookService = (BookService) ApplicationContextProvider.getApplicationContext().getBean("bookService");
       RepeatingView repeating = new RepeatingView("repeating");
View Full Code Here

Examples of org.apache.wicket.util.string.StringValue.toLong()

            repeating.add(item);
        }
       
        StringValue readerId = parameters.get("readerId");
        if (!readerId.isEmpty()) {
            readerService.deleteReader(readerService.findReaderById(readerId.toLong()));
            setResponsePage(ShowAllReader.class);
        }

        BookmarkablePageLink addReaderLink = new BookmarkablePageLink<>(
                "addReader", EditReader.class);
View Full Code Here

Examples of org.apache.wicket.util.string.StringValue.toLong()

        }
       
        //delete reservation
        StringValue reservationId = parameters.get("reservationid");
        if (!reservationId.isEmpty()) {
            reservationService.deleteReservation(reservationService.findReservationByID(reservationId.toLong()));
            setResponsePage(BookReservation.class);
        }
    }
}
View Full Code Here

Examples of org.apache.wicket.util.string.StringValue.toLong()

        StringValue readerId = parameters.get("readerId");
        if (readerId.isEmpty()) {
            reader = new ReaderTO();
            add(new Label("title", new Model("Create reader")));
        } else {
            reader = readerService.findReaderById(readerId.toLong());
            add(new Label("title", new Model("Edit reader")));
        }

        Form<?> form = new Form("form") {
            @Override
View Full Code Here

Examples of org.apache.wicket.util.string.StringValue.toLong()

        }

        //delete reservation
        StringValue reservationId = parameters.get("reservationid");
        if (!reservationId.isEmpty()) {
            reservationService.deleteReservation(reservationService.findReservationByID(reservationId.toLong()));
            setResponsePage(ShowAllReservation.class);
        }

        BookmarkablePageLink createLink = new BookmarkablePageLink<>(
                "create", ShowAllReader.class);
View Full Code Here

Examples of org.apache.wicket.util.string.StringValue.toLong()

  public SignInPage(PageParameters p) {
    super();
    StringValue oauthid = p.get("oauthid");
    if (!oauthid.isEmpty()) { // oauth2 login
      try {
        long serverId = oauthid.toLong(-1);
        OAuthServer server = getBean(OAuth2Dao.class).get(serverId);
        log.debug("OAuthServer=" + server);
        if (server == null) {
          log.warn("OAuth server id=" + serverId + " not found");
          return;
View Full Code Here

Examples of org.datanucleus.store.types.ObjectLongConverter.toLong()

            dbObject.put(fieldName, strValue);
        }
        else if (longConv != null)
        {
            // Persist as a Long
            Long longValue = longConv.toLong(value);
            dbObject.put(fieldName, longValue);
        }
        else
        {
            dbObject.put(fieldName, value);
View Full Code Here

Examples of org.dhcp4java.InetCidr.toLong()

  }
 
  @Test
  public void testToLong() throws UnknownHostException {
    InetCidr cidr = new InetCidr(InetAddress.getByName("10.11.12.0"), 24);
    assertEquals(0x180A0B0C00L, cidr.toLong());
  }
 
  @Test
  public void testFromLong() throws UnknownHostException {
    InetCidr cidr = new InetCidr(InetAddress.getByName("10.11.12.0"), 24);
View Full Code Here

Examples of org.exolab.castor.types.Duration.toLong()

      }
      /* it is better for a good understanding to use
      the parse method with 'min.toSring()' but in that case
      we have to deal with the ParseException*/
      jsc.append(
        "new org.exolab.castor.types.Duration(" + min.toLong() + "L)");
      jsc.append(");");
    }
    if (hasMaximum()) {
      Duration max = getMaxExclusive();
      if (max != null)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.