/** * Returns the table name used by the ID fetch query. * * @param clazz the Class of the object * @param schema the DatabaseSchema * @return a table name * @throws ObjectStoreException if the given class is not in the model */ public static String tableNameForId(Class<?> clazz, DatabaseSchema schema) throws ObjectStoreException { ClassDescriptor tableMaster; if (schema.isMissingNotXml()) { tableMaster = schema.getModel() .getClassDescriptorByName(InterMineObject.class.getName()); } else { ClassDescriptor cld = schema.getModel().getClassDescriptorByName(clazz.getName()); if (cld == null) { throw new ObjectStoreException(clazz.toString() + " is not in the model"); } tableMaster = schema.getTableMaster(cld); } return DatabaseUtil.getTableName(tableMaster); }
/** * Returns the table name used by the ID fetch query. * * @param clazz the Class of the object * @param schema the DatabaseSchema * @return a table name * @throws ObjectStoreException if the given class is not in the model */ public static String tableNameForId(Class<?> clazz, DatabaseSchema schema) throws ObjectStoreException { ClassDescriptor tableMaster; if (schema.isMissingNotXml()) { tableMaster = schema.getModel() .getClassDescriptorByName(InterMineObject.class.getName()); } else { ClassDescriptor cld = schema.getModel().getClassDescriptorByName(clazz.getName()); if (cld == null) { throw new ObjectStoreException(clazz.toString() + " is not in the model"); } tableMaster = schema.getTableMaster(cld); } return DatabaseUtil.getTableName(tableMaster); }
if (schema.isMissingNotXml()) { tableMaster = schema.getModel() .getClassDescriptorByName(InterMineObject.class.getName());
if (schema.isMissingNotXml()) { tableMaster = schema.getModel() .getClassDescriptorByName(InterMineObject.class.getName());
if ((!(schema.isMissingNotXml() || schema.isFlatMode(cld.getType()))) || InterMineObject.class.equals(cld.getType())) { sb.append(generateColumn("OBJECT", "java.lang.String"));
if ((!(schema.isMissingNotXml() || schema.isFlatMode(cld.getType()))) || InterMineObject.class.equals(cld.getType())) { sb.append(generateColumn("OBJECT", "java.lang.String"));
for (QuerySelectable selectable : q.getSelect()) { if (selectable instanceof QueryClass) { if (addInterMineObject && schema.isMissingNotXml()) { tablenames.add(interMineObject); Collection<Integer> empty = Collections.singleton(new Integer(1)); findTableNames(tablenames, ((QueryObjectPathExpression) selectable) .getQuery(empty, schema.isMissingNotXml()), schema, addInterMineObject, individualOsbs); } else if (selectable instanceof PathExpressionField) { Collection<Integer> empty = Collections.singleton(new Integer(1)); findTableNames(tablenames, ((PathExpressionField) selectable).getQope() .getQuery(empty, schema.isMissingNotXml()), schema, addInterMineObject, individualOsbs); } else {
for (QuerySelectable selectable : q.getSelect()) { if (selectable instanceof QueryClass) { if (addInterMineObject && schema.isMissingNotXml()) { tablenames.add(interMineObject); Collection<Integer> empty = Collections.singleton(new Integer(1)); findTableNames(tablenames, ((QueryObjectPathExpression) selectable) .getQuery(empty, schema.isMissingNotXml()), schema, addInterMineObject, individualOsbs); } else if (selectable instanceof PathExpressionField) { Collection<Integer> empty = Collections.singleton(new Integer(1)); findTableNames(tablenames, ((PathExpressionField) selectable).getQope() .getQuery(empty, schema.isMissingNotXml()), schema, addInterMineObject, individualOsbs); } else {
getSchema().isMissingNotXml()); if (subQ.getConstraint() != null) { retval.addAll(precomputeWithConnection(c, subQ,
getSchema().isMissingNotXml()); if (subQ.getConstraint() != null) { retval.addAll(precomputeWithConnection(c, subQ,
getSchema().isMissingNotXml()); if ((subQ.getFrom().size() > 1) && (subQ.getConstraint() == null)) { LOG.error("Software bug - we are being asked to precompute a cross "
getSchema().isMissingNotXml()); if ((subQ.getFrom().size() > 1) && (subQ.getConstraint() == null)) { LOG.error("Software bug - we are being asked to precompute a cross "
int colCount = allColumns.getAttributes().size() + allColumns.getReferences().size(); boolean isTruncated = schema.isTruncated(tableMaster); boolean hasObject = "InterMineObject".equals(tableName) || (!(schema.isMissingNotXml() || schema.isFlatMode(tableMaster.getType()))); if (isTruncated) {
int colCount = allColumns.getAttributes().size() + allColumns.getReferences().size(); boolean isTruncated = schema.isTruncated(tableMaster); boolean hasObject = "InterMineObject".equals(tableName) || (!(schema.isMissingNotXml() || schema.isFlatMode(tableMaster.getType()))); if (isTruncated) {
Query qopeQuery = qope.getQuery(idsToFetch, os.getSchema().isMissingNotXml()); long startTime = System.currentTimeMillis(); List<ResultsRow<Object>> res = os.executeWithConnection(c, qopeQuery, 0,
if (schema.isMissingNotXml()) { for (ClassDescriptorAndAlias aliasEntry : aliases) { ClassDescriptor cld = aliasEntry.getClassDescriptor();
if (schema.isMissingNotXml()) { for (ClassDescriptorAndAlias aliasEntry : aliases) { ClassDescriptor cld = aliasEntry.getClassDescriptor();
Query qopeQuery = qope.getQuery(idsToFetch, os.getSchema().isMissingNotXml()); long startTime = System.currentTimeMillis(); List<ResultsRow<Object>> res = os.executeWithConnection(c, qopeQuery, 0,