Search in sources :

Example 16 with PCJDetails

use of org.apache.rya.api.instance.RyaDetails.PCJIndexDetails.PCJDetails in project incubator-rya by apache.

the class MongoDetailsAdapterTest method toDBObject_pcjDetails_missing_optionals.

@Test
public void toDBObject_pcjDetails_missing_optionals() {
    final PCJDetails details = PCJDetails.builder().setId("pcjId").build();
    // Convert it into a Mongo DB Object.
    final BasicDBObject dbo = (BasicDBObject) MongoDetailsAdapter.toDBObject(details);
    // Convert the dbo back into the original object.
    final PCJDetails restored = MongoDetailsAdapter.toPCJDetails(dbo).build();
    // Ensure the restored value matches the original.
    assertEquals(details, restored);
}
Also used : BasicDBObject(com.mongodb.BasicDBObject) PCJDetails(org.apache.rya.api.instance.RyaDetails.PCJIndexDetails.PCJDetails) Test(org.junit.Test)

Aggregations

PCJDetails (org.apache.rya.api.instance.RyaDetails.PCJIndexDetails.PCJDetails)16 Test (org.junit.Test)9 RyaDetails (org.apache.rya.api.instance.RyaDetails)8 PrecomputedJoinStorage (org.apache.rya.indexing.pcj.storage.PrecomputedJoinStorage)8 RyaDetailsRepository (org.apache.rya.api.instance.RyaDetailsRepository)6 AccumuloRyaInstanceDetailsRepository (org.apache.rya.accumulo.instance.AccumuloRyaInstanceDetailsRepository)5 RyaClientException (org.apache.rya.api.client.RyaClientException)5 AccumuloPcjStorage (org.apache.rya.indexing.pcj.storage.accumulo.AccumuloPcjStorage)5 RyaDetailsRepositoryException (org.apache.rya.api.instance.RyaDetailsRepository.RyaDetailsRepositoryException)4 BasicDBObject (com.mongodb.BasicDBObject)3 Date (java.util.Date)3 CreatePCJ (org.apache.rya.api.client.CreatePCJ)3 InstanceDoesNotExistException (org.apache.rya.api.client.InstanceDoesNotExistException)3 PCJIndexDetails (org.apache.rya.api.instance.RyaDetails.PCJIndexDetails)3 RyaDetailsUpdater (org.apache.rya.api.instance.RyaDetailsUpdater)3 RyaDetailsMutator (org.apache.rya.api.instance.RyaDetailsUpdater.RyaDetailsMutator)3 CouldNotApplyMutationException (org.apache.rya.api.instance.RyaDetailsUpdater.RyaDetailsMutator.CouldNotApplyMutationException)3 MongoRyaInstanceDetailsRepository (org.apache.rya.mongodb.instance.MongoRyaInstanceDetailsRepository)3 Connector (org.apache.accumulo.core.client.Connector)2 Install (org.apache.rya.api.client.Install)2