-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
73 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
vcell-restclient/src/main/java/org/vcell/restclient/utils/DtoModelTransforms.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package org.vcell.restclient.utils; | ||
|
||
|
||
import org.vcell.util.Extent; | ||
import org.vcell.util.Origin; | ||
|
||
public class DtoModelTransforms { | ||
|
||
public static org.vcell.restclient.model.ISize iSizeToDTO(org.vcell.util.ISize iSize){ | ||
org.vcell.restclient.model.ISize iSizeDTO = new org.vcell.restclient.model.ISize(); | ||
iSizeDTO.setX(iSize.getX()); | ||
iSizeDTO.setY(iSize.getY()); | ||
iSizeDTO.setZ(iSize.getZ()); | ||
return iSizeDTO; | ||
} | ||
|
||
public static org.vcell.util.ISize dtoToISize(org.vcell.restclient.model.ISize dto){ | ||
return new org.vcell.util.ISize(dto.getX(), dto.getY(), dto.getZ()); | ||
} | ||
|
||
public static org.vcell.restclient.model.Origin originToDTO(Origin origin){ | ||
org.vcell.restclient.model.Origin dtoOrigin = new org.vcell.restclient.model.Origin(); | ||
dtoOrigin.setX(origin.getX()); | ||
dtoOrigin.setY(origin.getY()); | ||
dtoOrigin.setZ(origin.getZ()); | ||
return dtoOrigin; | ||
} | ||
|
||
public static Origin dtoToOrigin(org.vcell.restclient.model.Origin dtoOrigin){ | ||
return new Origin(dtoOrigin.getX(), dtoOrigin.getY(), dtoOrigin.getZ()); | ||
} | ||
|
||
|
||
public static org.vcell.restclient.model.Extent extentToDTO(Extent extent) { | ||
org.vcell.restclient.model.Extent newExtent = new org.vcell.restclient.model.Extent(); | ||
newExtent.setX(extent.getX()); | ||
newExtent.setY(extent.getY()); | ||
newExtent.setZ(extent.getZ()); | ||
return newExtent; | ||
} | ||
|
||
public static Extent dtoToExtent(org.vcell.restclient.model.Extent dto) { | ||
return new Extent(dto.getX(), dto.getY(), dto.getZ()); | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters