コード例 #1
0
ファイル: Goal.java プロジェクト: rajskumar/semplest2
 public synchronized boolean equals(java.lang.Object obj) {
   if (!(obj instanceof Goal)) return false;
   Goal other = (Goal) obj;
   if (obj == null) return false;
   if (this == obj) return true;
   if (__equalsCalc != null) {
     return (__equalsCalc == obj);
   }
   __equalsCalc = obj;
   boolean _equals;
   _equals =
       true
           && ((this.costModel == null && other.getCostModel() == null)
               || (this.costModel != null
                   && java.util.Arrays.equals(this.costModel, other.getCostModel())))
           && ((this.daysApplicableForConversion == null
                   && other.getDaysApplicableForConversion() == null)
               || (this.daysApplicableForConversion != null
                   && this.daysApplicableForConversion.equals(
                       other.getDaysApplicableForConversion())))
           && ((this.id == null && other.getId() == null)
               || (this.id != null && this.id.equals(other.getId())))
           && ((this.name == null && other.getName() == null)
               || (this.name != null && this.name.equals(other.getName())))
           && ((this.revenueModel == null && other.getRevenueModel() == null)
               || (this.revenueModel != null && this.revenueModel.equals(other.getRevenueModel())))
           && ((this.steps == null && other.getSteps() == null)
               || (this.steps != null && java.util.Arrays.equals(this.steps, other.getSteps())))
           && ((this.YEventId == null && other.getYEventId() == null)
               || (this.YEventId != null && this.YEventId.equals(other.getYEventId())));
   __equalsCalc = null;
   return _equals;
 }
コード例 #2
0
ファイル: Collection.java プロジェクト: lpien/DisorderApp
  private static ContentValues getContentValues_goal(Goal goal) {
    ContentValues values = new ContentValues();

    values.put(Schema.GoalTable.Cols.STATUS, goal.getStatus().toString());
    values.put(Schema.GoalTable.Cols.PROGRESS, goal.getProgress());
    values.put(Schema.GoalTable.Cols.NAME, goal.getName());

    return values;
  }
コード例 #3
0
 public Goal getGoal(String name) {
   Iterator<Goal> iti = getGoals().iterator();
   Goal help = null;
   while (iti.hasNext()) {
     help = iti.next();
     if (help.getName().equals(name)) return help;
   }
   return null;
 }
コード例 #4
0
ファイル: Collection.java プロジェクト: lpien/DisorderApp
 // Updating goal status / progress using the name of the goal
 public void updateGoal(Goal goal) {
   ContentValues values = getContentValues_goal(goal);
   String name = goal.getName();
   Database.update(
       Schema.GoalTable.NAME, values, Schema.GoalTable.Cols.NAME + "=?", new String[] {name});
 }