Java Code Examples for org.dozer.DozerBeanMapperSingletonWrapper#getInstance()
The following examples show how to use
org.dozer.DozerBeanMapperSingletonWrapper#getInstance() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LOVResourceTest.java From eplmp with Eclipse Public License 1.0 | 6 votes |
@Test public void createLOVTest() throws ApplicationException, UnsupportedEncodingException { ListOfValuesDTO lovDTO = new ListOfValuesDTO(); lovDTO.setName("lov"); List<NameValuePairDTO> values = new ArrayList<>(); NameValuePairDTO value = new NameValuePairDTO(); value.setName("k"); value.setValue("v"); values.add(value); lovDTO.setValues(values); Mapper mapper = DozerBeanMapperSingletonWrapper.getInstance(); ListOfValues lov = mapper.map(lovDTO, ListOfValues.class); Mockito.doNothing().when(lovManager) .createLov(workspaceId, lov.getName(), lov.getValues()); Response res = lovResource.createLOV(workspaceId, lovDTO); Assert.assertEquals(Response.Status.CREATED.getStatusCode(), res.getStatus()); }
Example 2
Source File: Tools.java From eplmp with Eclipse Public License 1.0 | 5 votes |
public static PartIterationDTO mapPartIterationToPartIterationDTO(PartIteration partIteration) { Mapper mapper = DozerBeanMapperSingletonWrapper.getInstance(); List<PartUsageLinkDTO> usageLinksDTO = new ArrayList<>(); PartIterationDTO partIterationDTO = mapper.map(partIteration, PartIterationDTO.class); for (PartUsageLink partUsageLink : partIteration.getComponents()) { PartUsageLinkDTO partUsageLinkDTO = mapper.map(partUsageLink, PartUsageLinkDTO.class); List<CADInstanceDTO> cadInstancesDTO = new ArrayList<>(); for (CADInstance cadInstance : partUsageLink.getCadInstances()) { CADInstanceDTO cadInstanceDTO = mapper.map(cadInstance, CADInstanceDTO.class); cadInstanceDTO.setMatrix(cadInstance.getRotationMatrix().getValues()); cadInstancesDTO.add(cadInstanceDTO); } List<PartSubstituteLinkDTO> substituteLinkDTOs = new ArrayList<>(); for (PartSubstituteLink partSubstituteLink : partUsageLink.getSubstitutes()) { PartSubstituteLinkDTO substituteLinkDTO = mapper.map(partSubstituteLink, PartSubstituteLinkDTO.class); substituteLinkDTOs.add(substituteLinkDTO); } partUsageLinkDTO.setCadInstances(cadInstancesDTO); partUsageLinkDTO.setSubstitutes(substituteLinkDTOs); usageLinksDTO.add(partUsageLinkDTO); } partIterationDTO.setComponents(usageLinksDTO); partIterationDTO.setNumber(partIteration.getPartRevision().getPartNumber()); partIterationDTO.setVersion(partIteration.getPartRevision().getVersion()); if (!partIteration.getGeometries().isEmpty()) { partIterationDTO.setGeometryFileURI("/api/files/" + partIteration.getSortedGeometries().get(0).getFullName()); } return partIterationDTO; }
Example 3
Source File: WorkspaceMembershipResource.java From eplmp with Eclipse Public License 1.0 | 4 votes |
@PostConstruct public void init() { mapper = DozerBeanMapperSingletonWrapper.getInstance(); }
Example 4
Source File: ChangeRequestsResource.java From eplmp with Eclipse Public License 1.0 | 4 votes |
@PostConstruct public void init() { mapper = DozerBeanMapperSingletonWrapper.getInstance(); }
Example 5
Source File: LOVResource.java From eplmp with Eclipse Public License 1.0 | 4 votes |
@PostConstruct public void init() { mapper = DozerBeanMapperSingletonWrapper.getInstance(); }
Example 6
Source File: UserGroupResource.java From eplmp with Eclipse Public License 1.0 | 4 votes |
@PostConstruct public void init() { mapper = DozerBeanMapperSingletonWrapper.getInstance(); }
Example 7
Source File: ChangeIssuesResource.java From eplmp with Eclipse Public License 1.0 | 4 votes |
@PostConstruct public void init() { mapper = DozerBeanMapperSingletonWrapper.getInstance(); }
Example 8
Source File: PartsResource.java From eplmp with Eclipse Public License 1.0 | 4 votes |
@PostConstruct public void init() { mapper = DozerBeanMapperSingletonWrapper.getInstance(); }
Example 9
Source File: MilestonesResource.java From eplmp with Eclipse Public License 1.0 | 4 votes |
@PostConstruct public void init() { mapper = DozerBeanMapperSingletonWrapper.getInstance(); }
Example 10
Source File: AttributesResource.java From eplmp with Eclipse Public License 1.0 | 4 votes |
@PostConstruct public void init() { mapper = DozerBeanMapperSingletonWrapper.getInstance(); }
Example 11
Source File: ChangeOrdersResource.java From eplmp with Eclipse Public License 1.0 | 4 votes |
@PostConstruct public void init() { mapper = DozerBeanMapperSingletonWrapper.getInstance(); }
Example 12
Source File: AccountResource.java From eplmp with Eclipse Public License 1.0 | 4 votes |
@PostConstruct public void init() { mapper = DozerBeanMapperSingletonWrapper.getInstance(); }
Example 13
Source File: ProductInstancesResource.java From eplmp with Eclipse Public License 1.0 | 4 votes |
@PostConstruct public void init() { mapper = DozerBeanMapperSingletonWrapper.getInstance(); }
Example 14
Source File: ProductBaselinesResource.java From eplmp with Eclipse Public License 1.0 | 4 votes |
@PostConstruct public void init() { mapper = DozerBeanMapperSingletonWrapper.getInstance(); }
Example 15
Source File: ProductResource.java From eplmp with Eclipse Public License 1.0 | 4 votes |
@PostConstruct public void init() { mapper = DozerBeanMapperSingletonWrapper.getInstance(); }
Example 16
Source File: ActivityDozerConverter.java From eplmp with Eclipse Public License 1.0 | 4 votes |
public ActivityDozerConverter() { super(Activity.class, ActivityDTO.class); mapper = DozerBeanMapperSingletonWrapper.getInstance(); }
Example 17
Source File: WorkflowResource.java From eplmp with Eclipse Public License 1.0 | 4 votes |
@PostConstruct public void init() { mapper = DozerBeanMapperSingletonWrapper.getInstance(); }
Example 18
Source File: TaskResource.java From eplmp with Eclipse Public License 1.0 | 4 votes |
@PostConstruct public void init() { mapper = DozerBeanMapperSingletonWrapper.getInstance(); }
Example 19
Source File: UserResource.java From eplmp with Eclipse Public License 1.0 | 4 votes |
@PostConstruct public void init() { mapper = DozerBeanMapperSingletonWrapper.getInstance(); }
Example 20
Source File: DocumentResource.java From eplmp with Eclipse Public License 1.0 | 4 votes |
@PostConstruct public void init() { mapper = DozerBeanMapperSingletonWrapper.getInstance(); }