new String[]{"testQueryXXX42", "wankle"} );
q.put( AssetItem.SOURCE_PROPERTY_NAME,
new String[]{"database", "wankle"} );
results = iteratorToList( repo.query( q,
false,
new DateQuery[]{new DateQuery( "jcr:created",
"1974-07-10T00:00:00.000-05:00",
"3074-07-10T00:00:00.000-05:00" )} ) );
assertEquals( 1,
results.size() );
as = results.get( 0 );
assertEquals( "testQuery",
as.getName() );
q = new HashMap<String, String[]>();
q.put( "drools:subject",
new String[]{"testQueryXXX42", "wankle"} );
q.put( AssetItem.SOURCE_PROPERTY_NAME,
new String[]{"database", "wankle"} );
results = iteratorToList( repo.query( q,
false,
new DateQuery[]{new DateQuery( "jcr:created",
"1974-07-10T00:00:00.000-05:00",
null )} ) );
assertEquals( 1,
results.size() );
as = results.get( 0 );
assertEquals( "testQuery",
as.getName() );
q = new HashMap<String, String[]>();
q.put( "drools:subject",
new String[]{"testQueryXXX42", "wankle"} );
q.put( AssetItem.SOURCE_PROPERTY_NAME,
new String[]{"database", "wankle"} );
results = iteratorToList( repo.query( q,
false,
new DateQuery[]{new DateQuery( "jcr:created",
null,
"3074-07-10T00:00:00.000-05:00" )} ) );
assertEquals( 1,
results.size() );
as = results.get( 0 );
assertEquals( "testQuery",
as.getName() );
//should return nothing:
q = new HashMap<String, String[]>();
q.put( "drools:subject",
new String[]{"testQueryXXX42", "wankle"} );
q.put( AssetItem.SOURCE_PROPERTY_NAME,
new String[]{"database", "wankle"} );
results = iteratorToList( repo.query( q,
false,
new DateQuery[]{new DateQuery( "jcr:created",
"3074-07-10T00:00:00.000-05:00",
null )} ) );
assertEquals( 0,
results.size() );
q = new HashMap<String, String[]>();
q.put( "drools:subject",
new String[]{"testQueryXXX42", "wankle"} );
q.put( AssetItem.SOURCE_PROPERTY_NAME,
new String[]{"database", "wankle"} );
results = iteratorToList( repo.query( q,
false,
new DateQuery[]{new DateQuery( "jcr:created",
null,
"1974-07-10T00:00:00.000-05:00" )} ) );
assertEquals( 0,
results.size() );