Guest User

Untitled

a guest
Jan 17th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. public boolean isDocumentsDeletedFormDB(String strDocumentsID) {
  2. }
  3.  
  4. public static class DeletedFromDBReturn {
  5. public final int integerValue;
  6. public final bool booleanValue;
  7.  
  8. private DeletedFromDBReturn(int i, bool b) {
  9. integerValue = i; booleanValue = b;
  10. }
  11. }
  12.  
  13. DeletedFromDBReturn sDocumentsDeletedFormDB(String strDocumentsID) {
  14. // ...
  15. return new DeletedFromDBReturn(intVal, boolVal);
  16. }
  17.  
  18. class MyObject{
  19. Integer i;
  20. Boolean b;
  21. ...
  22. }
  23.  
  24. public MyObject isDocumentsDeletedFormDB(String strDocumentsID) {
  25. MyObject mObj= new MyObject();
  26. mObj.setI(..);
  27. ...
  28. return mObj;
  29. }
  30.  
  31. public class MyPOJO{
  32. private boolean booleanValue;
  33. private Integer integerValue;
  34.  
  35.  
  36. public void setBooleanValue(boolean booleanValue){
  37. this.booleanValue = booleanValue
  38. }
  39.  
  40. public void setIntegerValue(Integer integerValue){
  41. this.integerValue = integerValue
  42. }
  43.  
  44. public boolean getBooleanValue(){
  45. return this.booleanValue;
  46. }
  47.  
  48. public Integer getIntegerValue(){
  49. return this.integerValue;
  50. }
  51. }
  52.  
  53. public MyPOJO isDocumentsDeletedFormDB(String strDocumentsID){
  54. /*
  55. * Your logic
  56. */
  57.  
  58. MyPOJO pojo = new MyPOJO();
  59. pojo.setIntegerValue(/* Your integer value */);
  60. pojo.setBooleanValue(/* Your boolean value */);
  61.  
  62. return pojo;
  63. }
  64.  
  65. public int isDocumentsDeletedFormDB(String strDocumentsID) {}
  66.  
  67. if(isDocumentsDeletedFormDB(str)==-1)
  68. //Do that you do when it is false.
Add Comment
Please, Sign In to add comment