@Test public void testCreateCombineMapping() { Mapping fm = AtlasModelFactory.createMapping(MappingType.COMBINE); validateMapping(fm, MappingType.COMBINE); }
@SuppressWarnings("unchecked") public static <T extends BaseMapping> T createMapping(MappingType type) { T fm = null; if (type == null) { return null; } switch (type) { case COLLECTION: fm = (T) new Collection(); ((Collection) fm).setMappingType(type); return fm; case COMBINE: case LOOKUP: case MAP: case SEPARATE: fm = (T) new Mapping(); ((Mapping) fm).setMappingType(type); return fm; default: throw new IllegalStateException(String.format("Unsupported mappingType=%s", type.value())); } }
AtlasModelFactory { @SuppressWarnings("unchecked") public static <T extends BaseMapping> T createMapping(MappingType type) { T fm = null; if (type == null) { return null; } switch (type) { case COLLECTION: fm = (T) new Collection(); ((Collection) fm).setMappingType(type); return fm; case COMBINE: case LOOKUP: case MAP: case SEPARATE: fm = (T) new Mapping(); ((Mapping) fm).setMappingType(type); return fm; default: throw new IllegalStateException(String.format("Unsupported mappingType=%s", type.value())); } } }
AtlasModelFactory { @SuppressWarnings("unchecked") public static <T extends BaseMapping> T createMapping(MappingType type) { T fm = null; if (type == null) { return null; } switch (type) { case COLLECTION: fm = (T) new Collection(); ((Collection) fm).setMappingType(type); return fm; case COMBINE: case LOOKUP: case MAP: case SEPARATE: fm = (T) new Mapping(); ((Mapping) fm).setMappingType(type); return fm; default: throw new IllegalStateException(String.format("Unsupported mappingType=%s", type.value())); } } private  AtlasModelFactory(); }
AtlasModelFactory { @SuppressWarnings("unchecked") public static <T extends BaseMapping> T createMapping(MappingType type) { T fm = null; if (type == null) { return null; } switch (type) { case COLLECTION: fm = (T) new Collection(); ((Collection) fm).setMappingType(type); return fm; case COMBINE: case LOOKUP: case MAP: case SEPARATE: fm = (T) new Mapping(); ((Mapping) fm).setMappingType(type); return fm; default: throw new IllegalStateException(String.format("Unsupported mappingType=%s", type.value())); } } private  AtlasModelFactory(); @SuppressWarnings("unchecked") static T createMapping(MappingType type); static AtlasMapping createAtlasMapping(); static Collection createCollection(); static MockDocument createMockDocument(); static MockField createMockField(); static PropertyField createPropertyField(); static BaseMapping cloneMapping(BaseMapping baseMapping, boolean deepClone); static Field cloneField(Field f); static FieldGroup copyFieldGroup(FieldGroup fg); static SimpleField cloneFieldToSimpleField(Field field); static void copyField(Field from, Field to, boolean withActions); static FieldGroup createFieldGroupFrom(Field field, boolean withActions); static ArrayList<Action> cloneFieldActions(ArrayList<Action> actions); static Action cloneAction(Action action); static String toString(PropertyField f); static String toString(Field f); static Field wrapWithField(Object val); static Field wrapWithField(Object val, String parentPath); static Object unwrapField(Field f); }
AtlasModelFactory { @SuppressWarnings("unchecked") public static <T extends BaseMapping> T createMapping(MappingType type) { T fm = null; if (type == null) { return null; } switch (type) { case COLLECTION: fm = (T) new Collection(); ((Collection) fm).setMappingType(type); return fm; case COMBINE: case LOOKUP: case MAP: case SEPARATE: fm = (T) new Mapping(); ((Mapping) fm).setMappingType(type); return fm; default: throw new IllegalStateException(String.format("Unsupported mappingType=%s", type.value())); } } private  AtlasModelFactory(); @SuppressWarnings("unchecked") static T createMapping(MappingType type); static AtlasMapping createAtlasMapping(); static Collection createCollection(); static MockDocument createMockDocument(); static MockField createMockField(); static PropertyField createPropertyField(); static BaseMapping cloneMapping(BaseMapping baseMapping, boolean deepClone); static Field cloneField(Field f); static FieldGroup copyFieldGroup(FieldGroup fg); static SimpleField cloneFieldToSimpleField(Field field); static void copyField(Field from, Field to, boolean withActions); static FieldGroup createFieldGroupFrom(Field field, boolean withActions); static ArrayList<Action> cloneFieldActions(ArrayList<Action> actions); static Action cloneAction(Action action); static String toString(PropertyField f); static String toString(Field f); static Field wrapWithField(Object val); static Field wrapWithField(Object val, String parentPath); static Object unwrapField(Field f); static final String GENERATED_PATH; }