Commit cd300e10 by Lee Munkyeong

コードレビュー対応。

parent a368af94
......@@ -39,9 +39,11 @@ public class RoomListJSON extends AcmsCommonJSON {
protected void parse(JSONObject json) throws JSONValidationException {
// ルーム一覧情報を取得
if (json.has(Body)) {
if (!json.has(Body)) { return; }
JSONArray roomListJsonArray = json.getJSONObject(Body).getJSONArray(ChatRoomInfoList);
if (roomListJsonArray != null) {
if (roomListJsonArray == null) { return; }
roomList = new ArrayList<ChatRoomDto>();
for (int listCount = 0; listCount < roomListJsonArray.length(); listCount++) {
if (roomListJsonArray.getJSONObject(listCount).length() == 0) {
......@@ -69,11 +71,8 @@ public class RoomListJSON extends AcmsCommonJSON {
chatMessageDto.chatMessageId = lastMessageInfoJSON.getInt(MessageId);
chatRoomDto.lastMessageInfo = chatMessageDto;
}
roomList.add(chatRoomDto);
}
}
}
}
}
......@@ -15,18 +15,17 @@ public class ChatMessageDto extends AbstractDto {
@Override
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
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
public String[] getKeyValues() {
return new String[]{""+ chatMessageId};
return new String[]{ "" + chatMessageId };
}
}
......@@ -18,17 +18,17 @@ public class ChatRoomDto extends AbstractDto {
@Override
public Object[] getInsertValues() {
return new Object[]{chatRoomId, chatRoomName, type, unreadCount, userCount, favoriteRegisterDate};
return new Object[] { chatRoomId, chatRoomName, type, unreadCount, userCount, favoriteRegisterDate };
}
@Override
public Object[] getUpdateValues() {
return new Object[]{favoriteRegisterDate, chatRoomName, type, unreadCount, userCount, chatRoomId};
return new Object[] { favoriteRegisterDate, chatRoomName, type, unreadCount, userCount, chatRoomId };
}
@Override
public String[] getKeyValues() {
return new String[]{""+ chatRoomId};
return new String[] { "" + chatRoomId };
}
}
......@@ -8,17 +8,17 @@ public class CollaborationDetailDto extends AbstractDto {
@Override
public Object[] getInsertValues() {
return new Object[]{collaborationDetialId, collaborationId, collaborationType, collaborationDuration};
return new Object[] { collaborationDetialId, collaborationId, collaborationType, collaborationDuration };
}
@Override
public Object[] getUpdateValues() {
return new Object[]{collaborationDuration, collaborationId, collaborationType, collaborationDetialId};
return new Object[] { collaborationDuration, collaborationId, collaborationType, collaborationDetialId };
}
@Override
public String[] getKeyValues() {
return new String[]{""+ collaborationDetialId};
return new String[]{ "" + collaborationDetialId };
}
}
......@@ -10,17 +10,17 @@ public class ShopMemberDto extends AbstractDto {
@Override
public Object[] getInsertValues() {
return new Object[]{shopMemberId, shopMemberName, profileUrl, favoriteRegisterDate};
return new Object[] { shopMemberId, shopMemberName, profileUrl, favoriteRegisterDate };
}
@Override
public Object[] getUpdateValues() {
return new Object[]{shopMemberName, profileUrl, favoriteRegisterDate, shopMemberId};
return new Object[] { shopMemberName, profileUrl, favoriteRegisterDate, shopMemberId };
}
@Override
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