Commit cd300e10 by Lee Munkyeong

コードレビュー対応。

parent a368af94
...@@ -39,9 +39,11 @@ public class RoomListJSON extends AcmsCommonJSON { ...@@ -39,9 +39,11 @@ public class RoomListJSON extends AcmsCommonJSON {
protected void parse(JSONObject json) throws JSONValidationException { protected void parse(JSONObject json) throws JSONValidationException {
// ルーム一覧情報を取得 // ルーム一覧情報を取得
if (json.has(Body)) { if (!json.has(Body)) { return; }
JSONArray roomListJsonArray = json.getJSONObject(Body).getJSONArray(ChatRoomInfoList); JSONArray roomListJsonArray = json.getJSONObject(Body).getJSONArray(ChatRoomInfoList);
if (roomListJsonArray != null) { if (roomListJsonArray == null) { return; }
roomList = new ArrayList<ChatRoomDto>(); roomList = new ArrayList<ChatRoomDto>();
for (int listCount = 0; listCount < roomListJsonArray.length(); listCount++) { for (int listCount = 0; listCount < roomListJsonArray.length(); listCount++) {
if (roomListJsonArray.getJSONObject(listCount).length() == 0) { if (roomListJsonArray.getJSONObject(listCount).length() == 0) {
...@@ -69,11 +71,8 @@ public class RoomListJSON extends AcmsCommonJSON { ...@@ -69,11 +71,8 @@ public class RoomListJSON extends AcmsCommonJSON {
chatMessageDto.chatMessageId = lastMessageInfoJSON.getInt(MessageId); chatMessageDto.chatMessageId = lastMessageInfoJSON.getInt(MessageId);
chatRoomDto.lastMessageInfo = chatMessageDto; chatRoomDto.lastMessageInfo = chatMessageDto;
} }
roomList.add(chatRoomDto); roomList.add(chatRoomDto);
} }
} }
}
}
} }
...@@ -15,18 +15,17 @@ public class ChatMessageDto extends AbstractDto { ...@@ -15,18 +15,17 @@ public class ChatMessageDto extends AbstractDto {
@Override @Override
public Object[] getInsertValues() { public Object[] getInsertValues() {
Object[] test = new Object[]{chatMessageId, chatRoomId, shopMemberId, message, messageType, imageName, downloadFileName, savePath, insertDate}; return new Object[] { chatMessageId, chatRoomId, shopMemberId, message, messageType, imageName, downloadFileName, savePath, insertDate };
return new Object[]{chatMessageId, chatRoomId, shopMemberId, message, messageType, imageName, downloadFileName, savePath, insertDate};
} }
@Override @Override
public Object[] getUpdateValues() { public Object[] getUpdateValues() {
return new Object[]{chatRoomId, shopMemberId, message, messageType, imageName, downloadFileName, savePath, insertDate, chatMessageId}; return new Object[] { chatRoomId, shopMemberId, message, messageType, imageName, downloadFileName, savePath, insertDate, chatMessageId };
} }
@Override @Override
public String[] getKeyValues() { public String[] getKeyValues() {
return new String[]{""+ chatMessageId}; return new String[]{ "" + chatMessageId };
} }
} }
...@@ -18,17 +18,17 @@ public class ChatRoomDto extends AbstractDto { ...@@ -18,17 +18,17 @@ public class ChatRoomDto extends AbstractDto {
@Override @Override
public Object[] getInsertValues() { public Object[] getInsertValues() {
return new Object[]{chatRoomId, chatRoomName, type, unreadCount, userCount, favoriteRegisterDate}; return new Object[] { chatRoomId, chatRoomName, type, unreadCount, userCount, favoriteRegisterDate };
} }
@Override @Override
public Object[] getUpdateValues() { public Object[] getUpdateValues() {
return new Object[]{favoriteRegisterDate, chatRoomName, type, unreadCount, userCount, chatRoomId}; return new Object[] { favoriteRegisterDate, chatRoomName, type, unreadCount, userCount, chatRoomId };
} }
@Override @Override
public String[] getKeyValues() { public String[] getKeyValues() {
return new String[]{""+ chatRoomId}; return new String[] { "" + chatRoomId };
} }
} }
...@@ -8,17 +8,17 @@ public class CollaborationDetailDto extends AbstractDto { ...@@ -8,17 +8,17 @@ public class CollaborationDetailDto extends AbstractDto {
@Override @Override
public Object[] getInsertValues() { public Object[] getInsertValues() {
return new Object[]{collaborationDetialId, collaborationId, collaborationType, collaborationDuration}; return new Object[] { collaborationDetialId, collaborationId, collaborationType, collaborationDuration };
} }
@Override @Override
public Object[] getUpdateValues() { public Object[] getUpdateValues() {
return new Object[]{collaborationDuration, collaborationId, collaborationType, collaborationDetialId}; return new Object[] { collaborationDuration, collaborationId, collaborationType, collaborationDetialId };
} }
@Override @Override
public String[] getKeyValues() { public String[] getKeyValues() {
return new String[]{""+ collaborationDetialId}; return new String[]{ "" + collaborationDetialId };
} }
} }
...@@ -10,17 +10,17 @@ public class ShopMemberDto extends AbstractDto { ...@@ -10,17 +10,17 @@ public class ShopMemberDto extends AbstractDto {
@Override @Override
public Object[] getInsertValues() { public Object[] getInsertValues() {
return new Object[]{shopMemberId, shopMemberName, profileUrl, favoriteRegisterDate}; return new Object[] { shopMemberId, shopMemberName, profileUrl, favoriteRegisterDate };
} }
@Override @Override
public Object[] getUpdateValues() { public Object[] getUpdateValues() {
return new Object[]{shopMemberName, profileUrl, favoriteRegisterDate, shopMemberId}; return new Object[] { shopMemberName, profileUrl, favoriteRegisterDate, shopMemberId };
} }
@Override @Override
public String[] getKeyValues() { public String[] getKeyValues() {
return new String[]{""+ shopMemberId}; return new String[]{ "" + shopMemberId };
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment