Examples of Author

  • org.apache.any23.plugin.Author
    Reference test class for {@link SpeciesExtractor}. @author Davide Palmisano (dpalmisano@gmail.com)
  • org.apache.aries.samples.blog.api.persistence.Author
  • org.apache.bval.jsr303.example.Author
  • org.apache.camel.dataformat.bindy.model.simple.onetomany.Author
  • org.apache.geronimo.test.jpa.entity.Author
    This class represents a blog post Author
  • org.apache.ibatis.domain.blog.Author
  • org.apache.jackrabbit.ocm.testmodel.version.Author
  • org.apache.torque.test.Author
  • org.apache.torque.test.dbobject.Author
    Author 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.wink.jaxrs.test.jaxb.book.Author
  • org.apache.ws.jaxme.test.misc.types.Author
  • org.asciidoctor.ast.Author
  • org.bar.foo.entities.Author
  • org.conserve.objects.Author
    @author Erik Berglund
  • org.dozer.vo.cumulative.Author
    @author Dmitry Buzdin
  • org.hibernate.search.test.performance.model.Author
    @author Tomas Hradec
  • org.jooq.example.db.h2.tables.Author
  • org.jooq.example.db.h2.tables.pojos.Author
  • org.jrest.dao.test.entities.Author
    作者、编著者、编译者 @author Franky
  • org.lexev.bestwisethoughts.client.data.Author
    Represent Author instance of thought @author Alexey Evseev
  • org.objectweb.speedo.pobjects.fetchgroup.Author
    @author Y.Bersihand
  • org.objectweb.speedo.tutorial.pobjects.additional.detach.Author
    @author Y.Bersihand
  • org.ops4j.pax.exam.sample1.model.Author
  • org.ops4j.pax.exam.sample4.model.Author
  • org.ops4j.pax.exam.sample6.model.Author
  • org.purl.sword.atom.Author
    Represents an Author type, as used in ATOM. This class is used as the base class for the different areas of ATOM that represent information about people. This includes the atom:author and atom:contributor elements. @author Neil Taylor
  • org.springframework.data.elasticsearch.entities.Author
    @author Rizwan Idrees @author Mohsin Husen
  • org.wicketstuff.osgi.test.library.model.Author
  • ru.aristar.jnuget.Author
    @author Unlocker
  • timforce.Author

  • Examples of org.apache.torque.test.Author

        public void testInsertData() throws Exception
        {
            // insert books and authors
            for (int i = 1; i <= 10; i++)
            {
                Author author = new Author();
                author.setName("Author " + i);
                author.save();
                assertTrue("authorId should not be 0 after insert",
                        author.getAuthorId() != 0);

                for (int j = 1; j <= 10; j++)
                {
                    Book book = new Book();
                    book.setAuthor(author);
    View Full Code Here

    Examples of org.apache.torque.test.Author

         */
        public void testDelete() throws Exception
        {
            cleanBookstore();

            Author author = new Author();
            author.setName("Name");
            author.save();

            Book book = new Book();
            book.setTitle("title");
            book.setAuthor(author);
            book.setIsbn("ISBN");
            book.save();

            // delete without matching data
            Criteria criteria = new Criteria();
            criteria.add(
                    AuthorPeer.AUTHOR_ID,
                    author.getAuthorId(),
                    Criteria.NOT_EQUAL);
            AuthorPeer.doDelete(criteria);
            List authorResult = AuthorPeer.doSelect(new Criteria());
            assertTrue("deleted too many records", authorResult.size() == 1);

            BookPeer.doDelete(book);
            List bookResult = BookPeer.doSelect(new Criteria());
            authorResult = AuthorPeer.doSelect(new Criteria());
            // check that the book has disappeared
            assertTrue("delete by object failed",
                bookResult.size() == 0);
            // check that the underlying author has not been deleted
            assertTrue("delete by object deleted in cascade",
                authorResult.size() == 1);

            // delete with matching data
            criteria.clear();
            criteria.add(AuthorPeer.AUTHOR_ID, author.getAuthorId());
            AuthorPeer.doDelete(criteria);
            authorResult = AuthorPeer.doSelect(new Criteria());
            assertTrue("deleted not enough records",
                authorResult.size() == 0);
        }
    View Full Code Here

    Examples of org.apache.torque.test.Author

            criteria = new Criteria();
            criteria.add(BookPeer.BOOK_ID, (Long) null, Criteria.NOT_EQUAL);
            BookPeer.doDelete(criteria, null);

            Author author = new Author();
            author.setName("name");
            author.save((Connection) null);
        }
    View Full Code Here

    Examples of org.apache.torque.test.Author

        public void testJoins() throws Exception
        {
            cleanBookstore();

            // insert test data
            Author author = new Author();
            author.setName("Author with one book");
            author.save();
            Book book = new Book();
            book.setAuthor(author);
            book.setTitle("Book 1");
            book.setIsbn("unknown");
            book.save();

            author = new Author();
            author.setName("Author without book");
            author.save();

            author = new Author();
            author.setName("Author with three books");
            author.save();
            for (int bookNr = 2; bookNr <=4; bookNr++)
            {
                book = new Book();
                book.setAuthor(author);
                book.setTitle("Book " + bookNr);
    View Full Code Here

    Examples of org.apache.torque.test.Author

        public void testOrderBy() throws Exception
        {
            cleanBookstore();

            // insert test data
            Author firstAuthor = new Author();
            firstAuthor.setName("Author 1");
            firstAuthor.save();
            Book book = new Book();
            book.setAuthor(firstAuthor);
            book.setTitle("Book 1");
            book.setIsbn("unknown");
            book.save();

            Author secondAuthor = new Author();
            secondAuthor.setName("Author 2");
            secondAuthor.save();
            for (int bookNr = 2; bookNr <=4; bookNr++)
            {
                book = new Book();
                book.setAuthor(secondAuthor);
                book.setTitle("Book " + bookNr);
    View Full Code Here

    Examples of org.apache.torque.test.Author

         */
        public void testIgnoreCase() throws Exception
        {
            cleanBookstore();

            Author author = new Author();
            author.setName("AuTHor");
            author.save();

            Criteria criteria = new Criteria();
            criteria.add(AuthorPeer.NAME, author.getName().toLowerCase());
            criteria.setIgnoreCase(true);
            List result = AuthorPeer.doSelect(criteria);
            if (result.size() != 1)
            {
                fail("Size of result is not 1, but " + result.size());
    View Full Code Here

    Examples of org.apache.torque.test.Author

         * @throws Exception if the test fails
         */
        public void testSameColumnName() throws Exception
        {
            cleanBookstore();
            Author author = new Author();
            author.setName("Name");
            author.save();

            author = new Author();
            author.setName("NotCorrespondingName");
            author.save();

            Book book = new Book();
            book.setTitle("Name");
            book.setAuthor(author);
            book.setIsbn("unknown");
            book.save();

            Criteria criteria = new Criteria();
            criteria.addJoin(BookPeer.TITLE, AuthorPeer.NAME);
            BookPeer.addSelectColumns(criteria);
            AuthorPeer.addSelectColumns(criteria);
            // basically a BaseBookPeer.setDbName(criteria);
            // and BasePeer.doSelect(criteria);
            List villageRecords = BookPeer.doSelectVillageRecords(criteria);
            Record record = (Record) villageRecords.get(0);
            book = new Book();
            BookPeer.populateObject(record, 1, book);
            author = new Author();
            AuthorPeer.populateObject(record, BookPeer.numColumns + 1, author);

            if (book.getAuthorId() == author.getAuthorId()) {
                fail("wrong Ids read");
            }
        }
    View Full Code Here

    Examples of org.apache.torque.test.Author

         * @throws Exception if the test fails
         */
        public void testCountHelper() throws Exception
        {
            cleanBookstore();
            Author author = new Author();
            author.setName("Name");
            author.save();

            author = new Author();
            author.setName("Name2");
            author.save();

            author = new Author();
            author.setName("Name");
            author.save();

            Criteria criteria = new Criteria();
            int count = new CountHelper().count(
                    criteria,
                    null,
    View Full Code Here

    Examples of org.apache.torque.test.Author

        /**
         * tests the creation of beans from objects and vice versa
         */
        public void testCreateBeans() throws Exception
        {
            Author author = new Author();
            author.setName(AUTHOR_1_NAME);
            author.setAuthorId(AUTHOR_1_ID);

            AuthorBean authorBean = author.getBean();
            assertTrue("bean.getName() is " + authorBean.getName()
                    + " should be " + author.getName(),
                    author.getName().equals(authorBean.getName()));
            assertTrue("bean.getId() is " + authorBean.getAuthorId()
                    + " should be " + AUTHOR_1_ID,
                    author.getAuthorId() == authorBean.getAuthorId());

            Author authorFromBean = Author.createAuthor(authorBean);
            assertTrue("author from bean has name " + authorFromBean.getName()
                    + " should be " + author.getName(),
                    author.getName().equals(authorFromBean.getName()));
            assertTrue("author from bean has Id " + authorFromBean.getAuthorId()
                    + " should be " + author.getAuthorId(),
                    author.getAuthorId() == authorBean.getAuthorId());
        }
    View Full Code Here

    Examples of org.apache.torque.test.Author

         * tests whether it is possible to serialize/deserialize beans
         * @throws Exception
         */
        public void testSerializeBeans() throws Exception
        {
            Author author = new Author();
            author.setName(AUTHOR_1_NAME);
            author.setAuthorId(AUTHOR_1_ID);

            AuthorBean authorBean = author.getBean();
           
            // serialize the AuthorBean
            byte[] serializedAuthorBean;
            {
                ObjectOutputStream objectOutputStream = 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.