@Test public void testFind() throws Exception { context.turnOffAuthorisationSystem(); mf.update(context); int id = mf.getFieldID(); MetadataField found = MetadataField.find(context, id); assertThat("testFind 0",found, notNullValue()); assertThat("testFind 1",found.getFieldID(), equalTo(mf.getFieldID())); context.restoreAuthSystemState(); }
public static MetadataField find(Context context, int id) throws SQLException { if (!isCacheInitialized()) { initCache(context); } Integer iid = Integer.valueOf(id); if (!id2field.containsKey(iid)) { return null; } return id2field.get(iid); }
MetadataField { public static MetadataField find(Context context, int id) throws SQLException { if (!isCacheInitialized()) { initCache(context); } Integer iid = Integer.valueOf(id); if (!id2field.containsKey(iid)) { return null; } return id2field.get(iid); } }
MetadataField { public static MetadataField find(Context context, int id) throws SQLException { if (!isCacheInitialized()) { initCache(context); } Integer iid = Integer.valueOf(id); if (!id2field.containsKey(iid)) { return null; } return id2field.get(iid); } MetadataField();  MetadataField(MetadataSchema schema);  MetadataField(MetadataSchema schema, String element,
            String qualifier, String scopeNote);  MetadataField(int schemaID, int fieldID, String element,
            String qualifier, String scopeNote);  MetadataField(TableRow row); }
MetadataField { public static MetadataField find(Context context, int id) throws SQLException { if (!isCacheInitialized()) { initCache(context); } Integer iid = Integer.valueOf(id); if (!id2field.containsKey(iid)) { return null; } return id2field.get(iid); } MetadataField();  MetadataField(MetadataSchema schema);  MetadataField(MetadataSchema schema, String element,
            String qualifier, String scopeNote);  MetadataField(int schemaID, int fieldID, String element,
            String qualifier, String scopeNote);  MetadataField(TableRow row); String getElement(); void setElement(String element); int getFieldID(); String getQualifier(); void setQualifier(String qualifier); int getSchemaID(); void setSchemaID(int schemaID); String getScopeNote(); void setScopeNote(String scopeNote); void create(Context context); static MetadataField findByElement(Context context, int schemaID,
            String element, String qualifier); static MetadataField[] findAll(Context context); static MetadataField[] findAllInSchema(Context context, int schemaID); void update(Context context); void delete(Context context); static String formKey(String schema, String element, String qualifier); static MetadataField find(Context context, int id); @Override boolean equals(Object obj); @Override int hashCode(); }
MetadataField { public static MetadataField find(Context context, int id) throws SQLException { if (!isCacheInitialized()) { initCache(context); } Integer iid = Integer.valueOf(id); if (!id2field.containsKey(iid)) { return null; } return id2field.get(iid); } MetadataField();  MetadataField(MetadataSchema schema);  MetadataField(MetadataSchema schema, String element,
            String qualifier, String scopeNote);  MetadataField(int schemaID, int fieldID, String element,
            String qualifier, String scopeNote);  MetadataField(TableRow row); String getElement(); void setElement(String element); int getFieldID(); String getQualifier(); void setQualifier(String qualifier); int getSchemaID(); void setSchemaID(int schemaID); String getScopeNote(); void setScopeNote(String scopeNote); void create(Context context); static MetadataField findByElement(Context context, int schemaID,
            String element, String qualifier); static MetadataField[] findAll(Context context); static MetadataField[] findAllInSchema(Context context, int schemaID); void update(Context context); void delete(Context context); static String formKey(String schema, String element, String qualifier); static MetadataField find(Context context, int id); @Override boolean equals(Object obj); @Override int hashCode();  }