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
lepdou
committed
Apr 12, 2016
1 parent
a3ba41c
commit 2dc30c7
Showing
16 changed files
with
696 additions
and
64 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
70 changes: 70 additions & 0 deletions
70
apollo-core/src/main/java/com/ctrip/apollo/core/dto/ItemChangeSets.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,70 @@ | ||
package com.ctrip.apollo.core.dto; | ||
|
||
import java.util.LinkedList; | ||
import java.util.List; | ||
|
||
/** | ||
* storage cud result | ||
*/ | ||
public class ItemChangeSets { | ||
|
||
private String modifyBy; | ||
private List<ItemDTO> createItems; | ||
private List<ItemDTO> updateItems; | ||
private List<ItemDTO> deletedItems; | ||
|
||
public void addCreatedItem(ItemDTO item) { | ||
if (createItems == null) { | ||
createItems = new LinkedList<>(); | ||
} | ||
createItems.add(item); | ||
} | ||
|
||
public void addupdateItem(ItemDTO item) { | ||
if (updateItems == null) { | ||
updateItems = new LinkedList<>(); | ||
} | ||
updateItems.add(item); | ||
} | ||
|
||
public void addDeletedItem(ItemDTO item) { | ||
if (deletedItems == null) { | ||
deletedItems = new LinkedList<>(); | ||
} | ||
deletedItems.add(item); | ||
} | ||
|
||
|
||
public List<ItemDTO> getCreateItems() { | ||
return createItems; | ||
} | ||
|
||
public List<ItemDTO> getUpdateItems() { | ||
return updateItems; | ||
} | ||
|
||
public List<ItemDTO> getDeletedItems() { | ||
return deletedItems; | ||
} | ||
|
||
public void setCreateItems(List<ItemDTO> createItems) { | ||
this.createItems = createItems; | ||
} | ||
|
||
public void setUpdateItems(List<ItemDTO> updateItems) { | ||
this.updateItems = updateItems; | ||
} | ||
|
||
public void setDeletedItems(List<ItemDTO> deletedItems) { | ||
this.deletedItems = deletedItems; | ||
} | ||
|
||
public String getModifyBy() { | ||
return modifyBy; | ||
} | ||
|
||
public void setModifyBy(String modifyBy) { | ||
this.modifyBy = modifyBy; | ||
} | ||
|
||
} |
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
31 changes: 31 additions & 0 deletions
31
apollo-core/src/main/java/com/ctrip/apollo/core/entity/SimpleRestfulResponse.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,31 @@ | ||
package com.ctrip.apollo.core.entity; | ||
|
||
/** | ||
* declare biz code and simple msg. maybe http response code is 200. | ||
*/ | ||
public class SimpleRestfulResponse { | ||
|
||
private int code; | ||
private String msg; | ||
|
||
public SimpleRestfulResponse(int code, String msg){ | ||
this.code = code; | ||
this.msg = msg; | ||
} | ||
|
||
public int getCode() { | ||
return code; | ||
} | ||
|
||
public void setCode(int code) { | ||
this.code = code; | ||
} | ||
|
||
public String getMsg() { | ||
return msg; | ||
} | ||
|
||
public void setMsg(String msg) { | ||
this.msg = msg; | ||
} | ||
} |
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
28 changes: 28 additions & 0 deletions
28
apollo-portal/src/main/java/com/ctrip/apollo/portal/entity/SimpleResponse.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,28 @@ | ||
package com.ctrip.apollo.portal.entity; | ||
|
||
public class SimpleResponse { | ||
|
||
private int code; | ||
private String msg; | ||
|
||
public SimpleResponse(int code, String msg){ | ||
this.code = code; | ||
this.msg = msg; | ||
} | ||
|
||
public int getCode() { | ||
return code; | ||
} | ||
|
||
public void setCode(int code) { | ||
this.code = code; | ||
} | ||
|
||
public String getMsg() { | ||
return msg; | ||
} | ||
|
||
public void setMsg(String msg) { | ||
this.msg = msg; | ||
} | ||
} |
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
Oops, something went wrong.