@Test public void testGenerateDocumentCreateIndexEntriesStatementsNoIndexField() throws IndexParseException { System.out.println("testGenerateDocumentCreateIndexEntriesStatementsNoIndexField"); Document entity = Fixtures.createTestDocument2(); entity.setObjectAsString("{}"); List<BoundStatement> result = IndexMaintainerHelper.generateDocumentCreateIndexEntriesStatements(f.getSession(), entity, PrimaryIndexBucketLocatorImpl.getInstance()); assertTrue(result.isEmpty()); }
public static List<BoundStatement> generateDocumentCreateIndexEntriesStatements(Session session, Document entity, BucketLocator bucketLocator) throws IndexParseException { List<Index> indices = getIndexForDocument(session, entity); ArrayList<BoundStatement> statementList = new ArrayList<>(indices.size()); for (Index index : indices) { BoundStatement bs = generateDocumentCreateIndexEntryStatement(session, index, entity, bucketLocator); if (bs != null) { statementList.add(bs); } } return statementList; }
IndexMaintainerHelper { public static List<BoundStatement> generateDocumentCreateIndexEntriesStatements(Session session, Document entity, BucketLocator bucketLocator) throws IndexParseException { List<Index> indices = getIndexForDocument(session, entity); ArrayList<BoundStatement> statementList = new ArrayList<>(indices.size()); for (Index index : indices) { BoundStatement bs = generateDocumentCreateIndexEntryStatement(session, index, entity, bucketLocator); if (bs != null) { statementList.add(bs); } } return statementList; } }
IndexMaintainerHelper { public static List<BoundStatement> generateDocumentCreateIndexEntriesStatements(Session session, Document entity, BucketLocator bucketLocator) throws IndexParseException { List<Index> indices = getIndexForDocument(session, entity); ArrayList<BoundStatement> statementList = new ArrayList<>(indices.size()); for (Index index : indices) { BoundStatement bs = generateDocumentCreateIndexEntryStatement(session, index, entity, bucketLocator); if (bs != null) { statementList.add(bs); } } return statementList; } private  IndexMaintainerHelper(); }
IndexMaintainerHelper { public static List<BoundStatement> generateDocumentCreateIndexEntriesStatements(Session session, Document entity, BucketLocator bucketLocator) throws IndexParseException { List<Index> indices = getIndexForDocument(session, entity); ArrayList<BoundStatement> statementList = new ArrayList<>(indices.size()); for (Index index : indices) { BoundStatement bs = generateDocumentCreateIndexEntryStatement(session, index, entity, bucketLocator); if (bs != null) { statementList.add(bs); } } return statementList; } private  IndexMaintainerHelper(); static List<BoundStatement> generateDocumentCreateIndexEntriesStatements(Session session, Document entity, BucketLocator bucketLocator); static BoundStatement generateDocumentCreateIndexEntryStatement(Session session, Index index, Document entity, BucketLocator bucketLocator); static List<BoundStatement> generateDocumentUpdateIndexEntriesStatements(Session session, Document entity, BucketLocator bucketLocator); static List<BoundStatement> generateDocumentDeleteIndexEntriesStatements(Session session, Document entity, BucketLocator bucketLocator); static List<Index> getIndexForDocument(Session session, Document entity); static boolean hasIndexedFieldChanged(BSONObject oldObject, Index index, Document entity); static BSONObject getOldObjectForUpdate(Session session, Document entity); static String getCQLStatementForInsert(Index index); static String generateCQLStatementForInsert(Index index); static String getCQLStatementForWhereClauses(String CQL, Index index); static String generateCQLStatementForWhereClauses(String CQL, Index index); }
IndexMaintainerHelper { public static List<BoundStatement> generateDocumentCreateIndexEntriesStatements(Session session, Document entity, BucketLocator bucketLocator) throws IndexParseException { List<Index> indices = getIndexForDocument(session, entity); ArrayList<BoundStatement> statementList = new ArrayList<>(indices.size()); for (Index index : indices) { BoundStatement bs = generateDocumentCreateIndexEntryStatement(session, index, entity, bucketLocator); if (bs != null) { statementList.add(bs); } } return statementList; } private  IndexMaintainerHelper(); static List<BoundStatement> generateDocumentCreateIndexEntriesStatements(Session session, Document entity, BucketLocator bucketLocator); static BoundStatement generateDocumentCreateIndexEntryStatement(Session session, Index index, Document entity, BucketLocator bucketLocator); static List<BoundStatement> generateDocumentUpdateIndexEntriesStatements(Session session, Document entity, BucketLocator bucketLocator); static List<BoundStatement> generateDocumentDeleteIndexEntriesStatements(Session session, Document entity, BucketLocator bucketLocator); static List<Index> getIndexForDocument(Session session, Document entity); static boolean hasIndexedFieldChanged(BSONObject oldObject, Index index, Document entity); static BSONObject getOldObjectForUpdate(Session session, Document entity); static String getCQLStatementForInsert(Index index); static String generateCQLStatementForInsert(Index index); static String getCQLStatementForWhereClauses(String CQL, Index index); static String generateCQLStatementForWhereClauses(String CQL, Index index); static final String ITABLE_INSERT_CQL; static final String ITABLE_UPDATE_CQL; static final String ITABLE_DELETE_CQL; }