Package org.hibernate.ogm.backendtck.id

Examples of org.hibernate.ogm.backendtck.id.NewsID


    assertAssociatedElementsHaveBeenIndexed();
  }

  private void populateDatastore() throws NotSupportedException, SystemException, Exception {
    List<IndexedLabel> labes = Arrays.asList( new IndexedLabel( "massindex" ), new IndexedLabel( "test" ) );
    IndexedNews news = new IndexedNews( new NewsID( "title", "author" ), "content" );
    news.setLabels( labes );
    boolean operationSuccessful = false;
    EntityManager em = null;
    try {
      getTransactionManager().begin();
View Full Code Here


  @SkipByGridDialect(value = { MONGODB, NEO4J }, comment = "Uses embedded key which is currently not supported by the db query parsers")
  public void testEntityWithCompositeIdMassIndexing() throws Exception {
    {
      Session session = openSession();
      Transaction transaction = session.beginTransaction();
      IndexedNews news = new IndexedNews( new NewsID( "title", "author" ), "content" );
      session.persist( news );
      transaction.commit();
      session.clear();
      session.close();
    }
View Full Code Here

  private static final String SEP = "::::";

  @Override
  public String objectToString(Object object) {
    NewsID newsId = (NewsID) object;
    return newsId.getTitle() + SEP + newsId.getAuthor();
  }
View Full Code Here

  }

  @Override
  public Object stringToObject(String stringValue) {
    String[] split = stringValue.split( SEP );
    return new NewsID( split[0], split[1] );
  }
View Full Code Here

TOP

Related Classes of org.hibernate.ogm.backendtck.id.NewsID

Copyright © 2018 www.massapicom. 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.