@Test public void testSelectCustomObjectFields() { DescribeSObjectResult dsr = createDescribeSObjectResult("testSelectCustomObjectFields"); dsr.setCustom(true); List<Field> filteredFields = new ForceJPAFieldFilter().filter(dsr); assertFilteredFields(filteredFields, Lists.newArrayList("CustomField__c")); }
@Override public List<Field> filter(DescribeSObjectResult dsr) { if (dsr.isCustom()) { return filterInternal(dsr, CUSTOM_OBJECT_COMMON_FIELDS); } else if (ForceJPAClassGeneratorUtils.hasAllCommonFields(dsr)) { return filterInternal(dsr, STANDARD_OBJECT_COMMON_FIELDS); } return filterInternal(dsr, ALL_OBJECT_COMMON_FIELDS); }
ForceJPAFieldFilter implements FieldFilter { @Override public List<Field> filter(DescribeSObjectResult dsr) { if (dsr.isCustom()) { return filterInternal(dsr, CUSTOM_OBJECT_COMMON_FIELDS); } else if (ForceJPAClassGeneratorUtils.hasAllCommonFields(dsr)) { return filterInternal(dsr, STANDARD_OBJECT_COMMON_FIELDS); } return filterInternal(dsr, ALL_OBJECT_COMMON_FIELDS); } }
ForceJPAFieldFilter implements FieldFilter { @Override public List<Field> filter(DescribeSObjectResult dsr) { if (dsr.isCustom()) { return filterInternal(dsr, CUSTOM_OBJECT_COMMON_FIELDS); } else if (ForceJPAClassGeneratorUtils.hasAllCommonFields(dsr)) { return filterInternal(dsr, STANDARD_OBJECT_COMMON_FIELDS); } return filterInternal(dsr, ALL_OBJECT_COMMON_FIELDS); }  }
ForceJPAFieldFilter implements FieldFilter { @Override public List<Field> filter(DescribeSObjectResult dsr) { if (dsr.isCustom()) { return filterInternal(dsr, CUSTOM_OBJECT_COMMON_FIELDS); } else if (ForceJPAClassGeneratorUtils.hasAllCommonFields(dsr)) { return filterInternal(dsr, STANDARD_OBJECT_COMMON_FIELDS); } return filterInternal(dsr, ALL_OBJECT_COMMON_FIELDS); }  @Override List<Field> filter(DescribeSObjectResult dsr); }
ForceJPAFieldFilter implements FieldFilter { @Override public List<Field> filter(DescribeSObjectResult dsr) { if (dsr.isCustom()) { return filterInternal(dsr, CUSTOM_OBJECT_COMMON_FIELDS); } else if (ForceJPAClassGeneratorUtils.hasAllCommonFields(dsr)) { return filterInternal(dsr, STANDARD_OBJECT_COMMON_FIELDS); } return filterInternal(dsr, ALL_OBJECT_COMMON_FIELDS); }  @Override List<Field> filter(DescribeSObjectResult dsr);  }