@Test public void testMappedPropertiesThatAreADifferentType() { oracle.addProperty("com.domain.Foo", "a", "java.lang.Integer"); addDto("FooDto", domain("Foo"), properties("a Long")); final DtoConfig dc = rootConfig.getDto("FooDto"); assertThat(dc.getProperties().size(), is(1)); assertThat(dc.getProperties().get(0).isExtension(), is(true)); }
public List<DtoProperty> getProperties() { if (properties == null) { properties = list(); final List<PropConfig> pcs = getPropertiesConfig(); if (getDomainType() != null) { addPropertiesFromDomainObject(pcs); addChainedPropertiesFromDomainObject(pcs); } addLeftOverExtensionProperties(pcs); sortProperties(pcs, properties); } return properties; }
DtoConfig { public List<DtoProperty> getProperties() { if (properties == null) { properties = list(); final List<PropConfig> pcs = getPropertiesConfig(); if (getDomainType() != null) { addPropertiesFromDomainObject(pcs); addChainedPropertiesFromDomainObject(pcs); } addLeftOverExtensionProperties(pcs); sortProperties(pcs, properties); } return properties; } }
DtoConfig { public List<DtoProperty> getProperties() { if (properties == null) { properties = list(); final List<PropConfig> pcs = getPropertiesConfig(); if (getDomainType() != null) { addPropertiesFromDomainObject(pcs); addChainedPropertiesFromDomainObject(pcs); } addLeftOverExtensionProperties(pcs); sortProperties(pcs, properties); } return properties; } DtoConfig(final TypeOracle oracle, final RootConfig root, final String simpleName, final Object map); }
DtoConfig { public List<DtoProperty> getProperties() { if (properties == null) { properties = list(); final List<PropConfig> pcs = getPropertiesConfig(); if (getDomainType() != null) { addPropertiesFromDomainObject(pcs); addChainedPropertiesFromDomainObject(pcs); } addLeftOverExtensionProperties(pcs); sortProperties(pcs, properties); } return properties; } DtoConfig(final TypeOracle oracle, final RootConfig root, final String simpleName, final Object map); List<DtoProperty> getProperties(); List<DtoProperty> getInheritedProperties(); List<DtoProperty> getAllProperties(); String getSimpleName(); String getDtoType(); boolean shouldAddPublicConstructor(); List<String> getAnnotations(); List<String> getInterfaces(); String getBaseDtoSimpleName(); DtoConfig getBaseDto(); List<DtoConfig> getSubClassDtos(); boolean includeBeanMethods(); String getDomainType(); List<String> getEquality(); boolean includeTessellModel(); boolean isEnum(); boolean isAbstract(); List<String> getEnumValues(); boolean isManualDto(); List<String> getForcedMappers(); boolean requiresMapperType(); boolean hasIdProperty(); boolean hasExtensionProperties(); @Override String toString(); }
DtoConfig { public List<DtoProperty> getProperties() { if (properties == null) { properties = list(); final List<PropConfig> pcs = getPropertiesConfig(); if (getDomainType() != null) { addPropertiesFromDomainObject(pcs); addChainedPropertiesFromDomainObject(pcs); } addLeftOverExtensionProperties(pcs); sortProperties(pcs, properties); } return properties; } DtoConfig(final TypeOracle oracle, final RootConfig root, final String simpleName, final Object map); List<DtoProperty> getProperties(); List<DtoProperty> getInheritedProperties(); List<DtoProperty> getAllProperties(); String getSimpleName(); String getDtoType(); boolean shouldAddPublicConstructor(); List<String> getAnnotations(); List<String> getInterfaces(); String getBaseDtoSimpleName(); DtoConfig getBaseDto(); List<DtoConfig> getSubClassDtos(); boolean includeBeanMethods(); String getDomainType(); List<String> getEquality(); boolean includeTessellModel(); boolean isEnum(); boolean isAbstract(); List<String> getEnumValues(); boolean isManualDto(); List<String> getForcedMappers(); boolean requiresMapperType(); boolean hasIdProperty(); boolean hasExtensionProperties(); @Override String toString();  }