Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public boolean isDocumentsDeletedFormDB(String strDocumentsID) {
- }
- public static class DeletedFromDBReturn {
- public final int integerValue;
- public final bool booleanValue;
- private DeletedFromDBReturn(int i, bool b) {
- integerValue = i; booleanValue = b;
- }
- }
- DeletedFromDBReturn sDocumentsDeletedFormDB(String strDocumentsID) {
- // ...
- return new DeletedFromDBReturn(intVal, boolVal);
- }
- class MyObject{
- Integer i;
- Boolean b;
- ...
- }
- public MyObject isDocumentsDeletedFormDB(String strDocumentsID) {
- MyObject mObj= new MyObject();
- mObj.setI(..);
- ...
- return mObj;
- }
- public class MyPOJO{
- private boolean booleanValue;
- private Integer integerValue;
- public void setBooleanValue(boolean booleanValue){
- this.booleanValue = booleanValue
- }
- public void setIntegerValue(Integer integerValue){
- this.integerValue = integerValue
- }
- public boolean getBooleanValue(){
- return this.booleanValue;
- }
- public Integer getIntegerValue(){
- return this.integerValue;
- }
- }
- public MyPOJO isDocumentsDeletedFormDB(String strDocumentsID){
- /*
- * Your logic
- */
- MyPOJO pojo = new MyPOJO();
- pojo.setIntegerValue(/* Your integer value */);
- pojo.setBooleanValue(/* Your boolean value */);
- return pojo;
- }
- public int isDocumentsDeletedFormDB(String strDocumentsID) {}
- if(isDocumentsDeletedFormDB(str)==-1)
- //Do that you do when it is false.
Add Comment
Please, Sign In to add comment