Examples of Book

  • org.agoncal.book.javaee7.chapter11.Book
    press.com/ http://www.antoniogoncalves.org --
  • org.agoncal.training.javaee6.domain.Book
    ntoniogoncalves.org --
  • org.albite.book.model.book.Book
  • org.apache.axis2.jibx.beans.Book
  • org.apache.axis2.json.adb.xsd.Book
    @version $Rev: 704201 $ $Date: 2008-10-13 14:52:25 -0400 (Mon, 13 Oct 2008) $
  • org.apache.bval.jsr303.example.Book
  • org.apache.camel.component.routebox.demo.Book
  • org.apache.camel.dataformat.bindy.model.simple.onetomany.Book
  • org.apache.camel.example.cxf.jaxrs.resources.Book
  • org.apache.cxf.customer.book.Book
  • org.apache.cxf.jaxrs.model.wadl.jaxb.Book
  • org.apache.cxf.jaxrs.resources.Book
  • org.apache.cxf.systest.jaxrs.Book
  • org.apache.cxf.systest.jaxrs.codegen.jibx.Book
  • org.apache.cxf.systest.jaxrs.security.Book
  • org.apache.flink.api.java.typeutils.runtime.AbstractGenericTypeSerializerTest.Book
  • org.apache.openjpa.persistence.enhance.identity.Book
    s.apache.org/jira/browse/OPENJPA-207">OPENJPA-207 @author Jeffrey Blattman @author Pinaki Poddar
  • org.apache.tapestry.vlib.ejb.Book
    Represents a single result row from a {@link IBookQuery}. In effect, this is a light-wieght, serializable, read-only version of an {@link IBook}bean, plus it contains the owner and holder name (which means we don't have to go find the correct {@link IPerson} to dig out the name).

    This is provided for efficient access when doing various queries. @version $Id: Book.java,v 1.4 2004/02/19 17:37:39 hlship Exp $ @author Howard Lewis Ship

  • org.apache.torque.test.Book
  • org.apache.torque.test.dbobject.Book
    Book table The skeleton for this class was autogenerated by Torque on: [Wed Feb 27 08:39:08 CET 2013] You should add additional methods to this class to meet the application requirements. This class will only be generated as long as it does not already exist in the output directory.
  • org.apache.wicket.util.tester.apps_1.Book
    @author Juergen Donnerstag
  • org.apache.wink.jaxrs.test.jaxb.book.Book
  • org.books.domain.Book
  • org.camelcookbook.transformation.myschema.Book
  • org.codehaus.xfire.demo.Book
    @author Dan Diephouse
  • org.conserve.objects.Book
    @author Erik Berglund
  • org.corrib.s3b.mbb.beans.Book
  • org.crosswire.jsword.book.Book
  • org.dcarew.samplemodel.model.Book
  • org.dozer.vo.cumulative.Book
    @author Dmitry Buzdin
  • org.easycassandra.bean.model.Book
    the Book class. @author otaviojava
  • org.eclipse.example.library.Book
    A representation of the model object 'Book'.

    The following features are supported:

    @see org.eclipse.example.library.LibraryPackage#getBook() @model @generated
  • org.exoplatform.services.rest.generated.Book
    3.org/2001/XMLSchema}anyType"> <sequence> <element ref="{}title"/> <element ref="{}author"/> <element ref="{}price"/> <element ref="{}member-price"/> </sequence> <attribute name="send-by-post" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /> </restriction> </complexContent> </complexType>
  • org.exoplatform.ws.frameworks.json.Book
    @author Andrey Parfonov @version $Id: Book.java 45 2010-10-05 06:51:11Z andrew00x $
  • org.glassfish.jersey.tests.integration.servlet_25_mvc_1.resource.Book
  • org.glassfish.jersey.tests.integration.servlet_25_mvc_2.resource.Book
  • org.glassfish.jersey.tests.integration.servlet_25_mvc_3.resource.Book
  • org.hibernate.search.test.performance.model.Book
    @author Tomas Hradec
  • org.hibernate.search.test.query.Book
    @author Emmanuel Bernard
  • org.infinispan.query.indexedembedded.Book
  • org.jboss.resteasy.cdi.decorators.Book
    Book is 1) a JAXB class, suitable for transport over the network, and 2) an @Entity class, suitable for JPA storage @author Ron Sigal @version $Revision: 1 $
  • org.jboss.resteasy.cdi.ejb.Book
    Book is 1) a JAXB class, suitable for transport over the network, and 2) an @Entity class, suitable for JPA storage It implements Serializable so that it can be returned from a JAX-RS resource in its role as EJB. @author Ron Sigal @version $Revision: 1 $
  • org.jboss.resteasy.cdi.events.Book
    Book is 1) a JAXB class, suitable for transport over the network, and 2) an @Entity class, suitable for JPA storage @author Ron Sigal @version $Revision: 1 $
  • org.jboss.resteasy.cdi.events.ejb.Book
    Book is 1) a JAXB class, suitable for transport over the network, and 2) an @Entity class, suitable for JPA storage @author Ron Sigal @version $Revision: 1 $
  • org.jboss.resteasy.cdi.injection.Book
    Book is 1) a JAXB class, suitable for transport over the network, and 2) an @Entity class, suitable for JPA storage @author Ron Sigal @version $Revision: 1 $
  • org.jboss.resteasy.cdi.interceptors.Book
    Book is 1) a JAXB class, suitable for transport over the network, and 2) an @Entity class, suitable for JPA storage @author Ron Sigal @version $Revision: 1 $
  • org.jboss.resteasy.examples.data.Book
    @author Bill Burke @version $Revision: 1 $
  • org.jboss.resteasy.links.test.Book
  • org.jboss.test.xml.book.Book
    Book class that represents book element in XML content. @version $Revision: 37406 $ @author Alexey Loubyansky
  • org.jooq.example.db.h2.tables.Book
  • org.jrest.dao.test.entities.Book
    书本 @author Franky
  • org.kite9.java.examples.library.Book
  • org.mockserver.model.Book
    @author jamesdbloom
  • org.mule.example.bookstore.Book
    Simple class which represents a Book in the catalog of the bookstore.
  • org.mule.test.integration.transaction.extras.Book
  • org.objectweb.speedo.tutorial.pobjects.additional.detach.Book
    @author Y.Bersihand
  • org.ocpsoft.rewrite.showcase.bookstore.model.Book
  • org.openfaces.demo.beans.datatable.Book
  • org.ops4j.pax.exam.sample1.model.Book
  • org.ops4j.pax.exam.sample4.model.Book
  • org.ops4j.pax.exam.sample6.model.Book
  • org.ow2.easybeans.tests.common.ejbs.entity.book.Book
    Defines a book with its name, id and author. @author Gisele Pinheiro Souza @author Eduardo Studzinski Estima de Castro
  • org.pau.assetmanager.entities.Book
    This class represents a Book which is a container of annotations @author Pau Carré Cardona
  • org.springframework.data.cassandra.test.integration.simpletons.Book
    Test POJO @author David Webb
  • org.springframework.data.elasticsearch.entities.Book
    @author Rizwan Idrees @author Mohsin Husen
  • org.springframework.issues.data.Book
  • org.switchyard.quickstarts.demos.library.types.Book
    3.org/2001/XMLSchema}anyType"> <sequence> <element name="isbn" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> <element name="title" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> <element name="synopsis" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> </sequence> </restriction> </complexContent> </complexType>
  • org.wicketstuff.osgi.test.library.model.Book
  • org.zkoss.zss.model.Book
    Represent a spread sheet book. @author henrichen
  • properties.Book
  • queries.Book
  • quickdb.model.Book
  • relationships.Book
  • sample.servicelifecycle.bean.Book
  • syam.BookEditor.Book
    BookActions (BookActions.java) @author syam
  • talend.camel.examples.jaxrsjmshttp.common.Book
  • test.controller.Book
  • test.entity.Book
  • test.utils.json.Book
  • transactions.Book

  • Examples of Models.Pojo.Book

            return col_names[col];
        }

        @Override
        public Object getValueAt(int rowIndex, int columnIndex) {
          Book book = (Book) list.get(rowIndex);
         
           Author author = book.getAuthor();
         
            switch(columnIndex){
                case 0 : return book.getId();
                case 1 : return book.getName();
                //case 2 : return book.getAuthor_id();
                case 2 : return author.getFull_name();
                case 3 : return book.getPrice();
                case 4 : return book.getTotal_pages();
                   
            }
            return new String();
        }
    View Full Code Here

    Examples of a.b.m2.Book

      @Test
      public void createBeanCreateCloneThenCloneShouldHaveSameStructureAndValuesButEveryElementOfDifferentReference() {
       
        // create some data
        // use a.b.m2.Book which has 1:N relations (collection) to other beans
        Book book = new Book("History of Britain", "John O'Farrel", ImmutableList.copyOf(new Section[] {
          new Section("Section1", "no description", ImmutableSet.copyOf(new Paragraph[] {
              new Paragraph(1, "Bla bla bla"),
              new Paragraph(1, "Bla bla bla"),
          })),
          new Section("Section2", "no description", ImmutableSet.copyOf(new Paragraph[] {
              new Paragraph(1066, "Bla bla bla"),
          })),
          new Section("Section3", "no description", ImmutableSet.copyOf(new Paragraph[] {
              new Paragraph(1, "Bla bla bla"),
              new Paragraph(2, "Bla bla bla"),
              new Paragraph(3, "Bla bla bla"),
          })),
        }));
       
        // instantiate cloner
        BookCloner987 bookCloner987 = new BookCloner987();
       
        // create clone
        Book clonedBook = bookCloner987.apply(book);
       
        // check assumptions
        assertNotNull(clonedBook);
       
        // clone should have same structure and values
        assertEquals(clonedBook.getAuthor(), "John O'Farrel");
        assertEquals(clonedBook.getSections().get(1).getName(), "Section2");
        assertEquals(clonedBook.getSections().get(1).getParagraphs().iterator().next().getNumber(), new Integer(1066));
           
        // ..but every element of different reference
        assertFalse(clonedBook == book);
        assertFalse(clonedBook.getSections().get(1) == book.getSections().get(1));
        assertFalse(clonedBook.getSections().get(1).getParagraphs().iterator().next() == book.getSections().get(1).getParagraphs().iterator().next());
      }
    View Full Code Here

    Examples of bookjpa.Book

            throws IOException {
            resp.setContentType("text/html");
            PrintWriter out = resp.getWriter();

            EntityManager em = EMF.get().createEntityManager();
            Book book = new Book();
            book.setTitle("The Grapes of Wrath");
            book.setAuthor("John Steinbeck");
            book.setCopyrightYear(1939);
            Date authorBirthdate =
                new GregorianCalendar(1902, Calendar.FEBRUARY, 27).getTime();
            book.setAuthorBirthdate(authorBirthdate);
            try {
                em.persist(book);
            } finally {
                em.close();
            }

            // Because we're asking for a system-assigned ID in the key,
            // we can't access the Book's key until after the
            // EntityManager has closed and the Book has been saved.  For
            // this example, we allow an exception thrown by the datastore
            // to propagate to the runtime environment and assume that if
            // we got here the Book was saved properly.
            out.println("<p>Added a Book entity to the datastore via JPA, key: " +
                        KeyFactory.keyToString(book.getKey()));

            SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss.SSSSSS");
            fmt.setTimeZone(new SimpleTimeZone(0, ""));
            out.println("<p>The time is: " + fmt.format(new Date()) + "</p>");
        }
    View Full Code Here

    Examples of br.com.caelum.tubaina.Book

          Scanner scanner = new Scanner(reader);
          scanner.useDelimiter("$$");
          if (scanner.hasNext())
            chapters.addAll(parse(scanner.next()));
        }
        return new Book(name, chapters, showNotes);
      }
    View Full Code Here

    Examples of business.Book

            String pageTitle;
            int step = RequestHelper.getInt( "step", request );
            RequestDispatcher dispatcher;
            HashMap<String, String> formErrors = new HashMap<String, String>();
            BookListing listing = ( BookListing ) request.getSession().getAttribute( "userListing" );
            Book book;

            /* Load necessary lexicons */
            bzb.getLexicon().load( "global" );
            bzb.getLexicon().load( "subject" );
            bzb.getLexicon().load( "book" );
    View Full Code Here

    Examples of cat.quickdb.model.Book

        public void testMany2ManyFunction(){
            ArrayList pages = new ArrayList();
            pages.add(new Page(2));
            pages.add(new Page(5));
            pages.add(new Page(7));
            Book book = new Book();
            book.setIsbn(234553);
            book.setName("foundation");
            book.setPage(pages);

            boolean value = admin.save(book);
            Assert.assertTrue(value);

            Book b = new Book();
            b.getPage().add(new Page());
            value = admin.obtainWhere(b, "name='foundation'");
            Assert.assertTrue(value);

            Assert.assertEquals(5, ((Page)b.getPage().get(1)).getPageNumber());
        }
    View Full Code Here

    Examples of client.ws.milanas.helpers.beans.Book

        {
            super(frameTitle, parent, indexTab, messages);
            double imgHeight, imgWidth, imgProp = 0.0;
            int iniPosition, i, y, x = 0;
            int fontSize = 32;
            Book book = (Book) item;
            Font titleFont = new Font("SansSerif", Font.BOLD, fontSize);
            Font labelsFont = new Font("SansSerif", Font.BOLD, 12);
            Font urlFont = null;
            Map fontAttrs = null;       
            ArrayList<String> authors = null;
            String aut = new String();
            String aux = null;
            ArrayList<CustomerReview> reviews = null;
            ArrayList<Offer> offers = null;
                   
            JDesktopPane panel = new JDesktopPane();
            JScrollPane scroll = new JScrollPane(panel, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
            Container content = getContentPane();
           
            JLabel title = new JLabel(book.getTitle());
            title.setFont(titleFont);
            title.setSize((int) title.getPreferredSize().getWidth(), (int) title.getPreferredSize().getHeight());
            while(title.getSize().getWidth() > (width - 17))
            {
                fontSize--;
                titleFont = new Font("SansSerif", Font.BOLD, fontSize);
                title.setFont(titleFont);
                title.setSize((int) title.getPreferredSize().getWidth(), (int) title.getPreferredSize().getHeight());
            }
            iniPosition = (int) (((width - 17) - title.getSize().getWidth()) / 2);
            title.setLocation(iniPosition, 0);
            panel.add(title);
           
            JLabel imgLabel = new JLabel();
            ImageIcon image = null;
            Image img = null;
            try
            {
                URL imgUrl = new URL(book.getImage());
                image = new ImageIcon(new URL(book.getImage()));
            }
            catch(MalformedURLException mue)
            {
                image = new ImageIcon("");
            }
            img = image.getImage();
            imgHeight = img.getHeight(image.getImageObserver());
            imgWidth = img.getWidth(image.getImageObserver());
            imgProp = imgHeight/imgWidth;
            if(imgHeight > 300)
            {
                imgHeight = 300;
                imgWidth = imgHeight / imgProp;
            }
            if(imgWidth > 300)
            {
                imgWidth = 300;
                imgHeight = imgWidth * imgProp;
            }
            img = img.getScaledInstance((int) imgWidth, (int) imgHeight, Image.SCALE_SMOOTH);
            image.setImage(img);
            imgLabel.setIcon(image);
            imgLabel.setSize((int) imgWidth, (int) imgHeight);
            y = (int) title.getPreferredSize().getHeight() + 10;
            imgLabel.setLocation(10, y);
            panel.add(imgLabel);
           
            x = (int) imgLabel.getSize().getWidth() + 50;
            JLabel asinLab = new JLabel(messages.getString("label.book.id"));
            asinLab.setFont(labelsFont);
            asinLab.setSize(150, 30);
            asinLab.setLocation(x, y);
            panel.add(asinLab);
            JLabel priceLab = new JLabel(messages.getString("label.price"));
            priceLab.setFont(labelsFont);
            priceLab.setSize(150, 30);
            priceLab.setLocation(x, y + 30);
            panel.add(priceLab);
            JLabel salesLab = new JLabel(messages.getString("label.rank"));
            salesLab.setFont(labelsFont);
            salesLab.setSize(150, 30);
            salesLab.setLocation(x, y + 30 * 2);
            panel.add(salesLab);
            JLabel averageLab = new JLabel(messages.getString("label.rating"));
            averageLab.setFont(labelsFont);
            averageLab.setSize(150, 30);
            averageLab.setLocation(x, y + 30 * 3);
            panel.add(averageLab);
            JLabel eanLab = new JLabel(messages.getString("label.ean"));
            eanLab.setFont(labelsFont);
            eanLab.setSize(150, 30);
            eanLab.setLocation(x, y + 30 * 4);
            panel.add(eanLab);
            JLabel isbnLab = new JLabel(messages.getString("label.isbn"));
            isbnLab.setFont(labelsFont);
            isbnLab.setSize(150, 30);
            isbnLab.setLocation(x, y + 30 * 5);
            panel.add(isbnLab);
            JLabel authorLab = new JLabel(messages.getString("label.author"));
            authorLab.setFont(labelsFont);
            authorLab.setSize(150, 30);
            authorLab.setLocation(x, y + 30 * 6);
            panel.add(authorLab);
            JLabel publisherLab = new JLabel(messages.getString("label.publisher"));
            publisherLab.setFont(labelsFont);
            publisherLab.setSize(150, 30);
            publisherLab.setLocation(x, y + 30 * 7);
            panel.add(publisherLab);
            JLabel pubDateLab = new JLabel(messages.getString("label.pub.date"));
            pubDateLab.setFont(labelsFont);
            pubDateLab.setSize(150, 30);
            pubDateLab.setLocation(x, y + 30 * 8);
            panel.add(pubDateLab);
            JLabel sumLab = new JLabel(messages.getString("label.summary"));
            sumLab.setFont(labelsFont);
            sumLab.setSize(150, 30);
            sumLab.setLocation(x, y + 30 * 9);
            panel.add(sumLab);
           
            x = x + 150;
           
            asin = new JLabel(book.getAsin());
            asin.setSize((int) asin.getPreferredSize().getWidth(), 30);
            asin.setLocation(x, y);
            panel.add(asin);
            JLabel price = new JLabel(book.getPrice());
            price.setSize((int) price.getPreferredSize().getWidth(), 30);
            price.setLocation(x, y + 30);
            panel.add(price);
            JLabel sales = new JLabel(book.getSalesRank());
            sales.setSize((int) sales.getPreferredSize().getWidth(), 30);
            sales.setLocation(x, y + 30 * 2);
            panel.add(sales);
            JLabel average = null;
            if(book.getAverageRating().equals(""))
            {
                average = new JLabel(book.getAverageRating());
            }
            else
            {
                formatter.applyPattern(messages.getString("content.rating"));
                Object[] messageArguments = {book.getAverageRating()};
                average = new JLabel(formatter.format(messageArguments));
            }
            average.setSize((int) average.getPreferredSize().getWidth(), 30);
            average.setLocation(x, y + 30 * 3);
            panel.add(average);
            JLabel ean = new JLabel(book.getEan());
            ean.setSize((int) ean.getPreferredSize().getWidth(), 30);
            ean.setLocation(x, y + 30 * 4);
            panel.add(ean);
            JLabel isbn = new JLabel(book.getIsbn());
            isbn.setSize((int) isbn.getPreferredSize().getWidth(), 30);
            isbn.setLocation(x, y + 30 * 5);
            panel.add(isbn);
            authors = book.getAuthors();
            for(i = 0; i < authors.size(); i++)
            {
                if(i < authors.size() - 1)
                {
                    aut = aut + authors.get(i) + " " + messages.getString("content.author") + " ";
                }
                else
                {
                    aut = aut + authors.get(i);
                }
            }
            JLabel author = new JLabel(aut);
            author.setSize((int) author.getPreferredSize().getWidth(), 30);
            author.setLocation(x, y + 30 * 6);
            panel.add(author);
            JLabel publisher = new JLabel(book.getPublisher());
            publisher.setSize((int) publisher.getPreferredSize().getWidth(), 30);
            publisher.setLocation(x, y + 30 * 7);
            panel.add(publisher);
            JLabel pubDate = new JLabel(book.getPublicationDate());
            pubDate.setSize((int) pubDate.getPreferredSize().getWidth(), 30);
            pubDate.setLocation(x, y + 30 * 8);
            panel.add(pubDate);
            JTextPane sum = new JTextPane();
            aux = book.getSummary();
            aux = aux.replaceAll("<P>", "\n\n").replaceAll("<BR>", "\n").replaceAll("<.*>", "");
            sum.setText(aux);
            sum.setEditable(false);
            sum.setSize(width - (x + 50), 200);
            sum.setPreferredSize(new Dimension(width - (x + 50), 200));
            sum.setOpaque(true);
            JScrollPane sumScroll = new JScrollPane(sum, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
            sumScroll.setLocation(x, y + 30 * 9);
            sumScroll.setSize(width - (x + 50), 210);
            sumScroll.setPreferredSize(new Dimension(width - (x + 50), 210));
            sumScroll.setBorder(BorderFactory.createLineBorder(Color.WHITE, 0));
            panel.add(sumScroll);
           
            y = y + (30 * 10) + 210;
           
            reviews = book.getReviews();
            offers = book.getOffers();
           
            if(reviews.size() > 0 || offers.size() > 0)
            {
                JLabel infoLab = new JLabel(messages.getString("label.info"));
                infoLab.setSize((int) infoLab.getPreferredSize().getWidth(), 30);
                infoLab.setLocation(10, y);
                panel.add(infoLab);
            }
           
            y = y + 30;
           
            if(reviews.size() > 0)
            {
                JDesktopPane reviewsPanel = getReviewsPanel(reviews, width, messages, formatter);
                reviewsPanel.setLocation(0, y);
                panel.add(reviewsPanel);
                y = y + (int) reviewsPanel.getSize().getHeight() + 30;
            }
           
            if(offers.size() > 0)
            {
                JDesktopPane offersPanel = getOffersPanel(offers, width, messages);
                offersPanel.setLocation(0, y);
                panel.add(offersPanel);
                y = y + (int) offersPanel.getSize().getHeight() + 30;
            }
           
            JLabel urlLab = new JLabel(messages.getString("label.info.book.url"));
            urlLab.setSize((int) urlLab.getPreferredSize().getWidth(), 30);
            urlLab.setLocation(10, y);
            panel.add(urlLab);
            //url = new JLabel(book.getUrl());
            JLabel url = new JLabel(messages.getString("label.book.url"));
            urlString = book.getUrl();
            urlFont = url.getFont();
            fontAttrs = urlFont.getAttributes();
            fontAttrs.put(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_ON);
            fontAttrs.put(TextAttribute.FOREGROUND, Color.BLUE);
            urlFont = urlFont.deriveFont(fontAttrs);
    View Full Code Here

    Examples of com.bookstore.domain.model.Book

      public MockBookTable() {
        // Initialize the list
        books = new ArrayList<Book>();
       
        // Set up fake data
        Book book1 = new Book();
        book1.setId("0");
        book1.setISBN("111111111");
        book1.setTitle("Book 1");
        book1.setAuthor("Book 1 Author");
        book1.setPrice(9.99);
       
        Book book2 = new Book();
        book2.setId("1");
        book2.setISBN("222222222");
        book2.setTitle("Book 2");
        book2.setAuthor("Book 2 Author");
        book2.setPrice(19.99);
       
        Book book3 = new Book();
        book3.setId("2");
        book3.setISBN("333333333");
        book3.setTitle("Book 3");
        book3.setAuthor("Book 3 Author");
        book3.setPrice(29.99);
       
        Book book4 = new Book();
        book4.setId("3");
        book4.setISBN("444444444");
        book4.setTitle("Book 4");
        book4.setAuthor("Book 4 Author");
        book4.setPrice(39.99);
       
        Book book5 = new Book();
        book5.setId("4");
        book5.setISBN("555555555");
        book5.setTitle("Book 5");
        book5.setAuthor("Book 5 Author");
        book5.setPrice(49.99);
       
        Book book6 = new Book();
        book6.setId("5");
        book6.setISBN("666666666");
        book6.setTitle("Book 6");
        book6.setAuthor("Book 6 Author");
        book6.setPrice(59.99);
       
        Book book7 = new Book();
        book7.setId("6");
        book7.setISBN("777777777");
        book7.setTitle("Book 7");
        book7.setAuthor("Book 7 Author");
        book7.setPrice(69.99);
       
        Book book8 = new Book();
        book8.setId("7");
        book8.setISBN("888888888");
        book8.setTitle("Book 8");
        book8.setAuthor("Book 8 Author");
        book8.setPrice(79.99);
       
        Book book9 = new Book();
        book9.setId("8");
        book9.setISBN("999999999");
        book9.setTitle("Book 9");
        book9.setAuthor("Book 9 Author");
        book9.setPrice(89.99);
       
        books.addAll(Arrays.asList(book1, book2, book3, book4, book5, book6, book7, book8, book9));
      }
    View Full Code Here

    Examples of com.david.model.Book

        }

        @GET
        @Produces(MediaType.APPLICATION_JSON)
        public String getJson() {
            Book book = new Book(2, "First Book");
            return gson.toJson(book);
        }
    View Full Code Here

    Examples of com.dtrules.samples.bookpreview.datamodel.Book

        boolean chance(int percent){
            return randint(100)<=percent;
        }
       
        private Book newBook(){
            Book book = new Book();
            book.setPublisher(publishers[randint(publishers.length)]);
            int pages = randint(200)+200;
            book.setPages(pages);
            int start = 1;
            boolean excluded = false;
            while(start < pages){
                int end = randint(20)+20+start;            // Chapters are 20 to 40 pages
                if(pages-end < 10 || end >= pages) end = pages; // Okay, we fit in the last chapter
                Chapter c = new Chapter();                 // Set up the chapter
                c.setBegin_page(start);
                c.setEnd_page(end);
               
                book.getChapters().add(c);                 // Add the chapter, and
                start = end+1;                             //  set the start of the next chapter
         
                if(excluded){                              // We exclude the ending chapters randomly.
                    book.getExcluded_chapters().add(c);
                }else{
                   excluded = randint(100)>70;             // Once we start excluding, we exclude the rest.
                }
            }
           
            if(flip()||flip()){                            // Half the books get a day limit.
                book.setDay_limit((randint(5)+1)*30);      // Limit to 30, 60, 90, 120, or 180 days.
            }else{
                book.setDay_limit(0);
            }
            return book;
        }
    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.