Skip to content
This repository has been archived by the owner on Jan 14, 2018. It is now read-only.

Commit

Permalink
Issue #93
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanenicolas committed May 9, 2013
1 parent 3a02ac5 commit c84ed1a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion RoboSpice-samples
Submodule RoboSpice-samples updated from e9d251 to 0e60f1
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ public class CacheEntry {
@DatabaseField
private Integer resultIdInteger;
@DatabaseField
private Long resultIdLong;
@DatabaseField
private Float resultIdFloat;
@DatabaseField
private Double resultIdDouble;
Expand All @@ -32,8 +34,7 @@ public CacheEntry() {

}

public CacheEntry(String cacheKey, long timestamp, Class<?> resultClass,
Object resultId) {
public CacheEntry(String cacheKey, long timestamp, Class<?> resultClass, Object resultId) {
this.cacheKey = cacheKey;
this.timestamp = timestamp;
this.resultClassName = resultClass.getName();
Expand All @@ -52,6 +53,8 @@ private void fillResultId(Object id) {
resultIdShort = (Short) id;
} else if (id instanceof Integer) {
resultIdInteger = (Integer) id;
} else if (id instanceof Long) {
resultIdLong = (Long) id;
} else if (id instanceof Float) {
resultIdFloat = (Float) id;
} else if (id instanceof Double) {
Expand Down Expand Up @@ -90,11 +93,13 @@ public Object getResultId() {
} else if (resultIdChar != null) {
return resultIdChar;
} else if (resultIdDouble != null) {
return resultIdChar;
return resultIdDouble;
} else if (resultIdFloat != null) {
return resultIdFloat;
} else if (resultIdInteger != null) {
return resultIdInteger;
} else if (resultIdLong != null) {
return resultIdLong;
} else if (resultIdShort != null) {
return resultIdShort;
} else if (resultIdString != null) {
Expand Down

0 comments on commit c84ed1a

Please sign in to comment.