Minimum Token Count : 50
results.addAll(super.getAllParameters());
// フォームから取得したパラメータをリストに追加
for (Entry entry : multiFormParams.entrySet()) {
MultiFormValue value = entry.getValue();
if (value instanceof MultiFormStringValue) {
List values = ((MultiFormStringValue)value).getValues();
for (String multiValue : values) {
results.add(new ParameterItem(entry.getKey(), multiValue));
}
}
}
return results;
}
// ------------------------ Public Methods
/**
* パラメータをファイル型で取得します。
* @param name パラメータ名
* @return ファイル
*/
public MultiFormFileValue getParameterFile(String name) {
return (MultiFormFileValue)multiFormParams.get(name);
}
}
}
public int getParameterIntDefault(String name, int defaultValue) {
String param = getParameter(name);
if (param == null) {
return defaultValue;
}
try {
return Integer.parseInt(param);
} catch (NumberFormatException e) {
return defaultValue;
}
}
public Integer getParameterInteger(String name) {
String param = getParameter(name);
if (param == null) {
return null;
}
try {
return Integer.valueOf(param);
} catch (NumberFormatException e) {
return null;
}
}
public String getParameter(String name) {
Map subValues = new HashMap();
for (int i = 0; i < attrs.getLength(); i++) {
Node attr = attrs.item(i);
subValues.put(attr.getNodeName(), attr.getNodeValue());
}
if (parentValues.get(nodeName) == null) {
parentValues.put(nodeName, subValues);
} else {
throw new IllegalStateException("予期されていない形式のXMLファイルです。");
}
}
MultiFormValue obj = multiFormParams.get(name);
if (obj instanceof MultiFormStringValue) {
List stringValues = ((MultiFormStringValue)obj).getValues();
return stringValues.toArray(new String[stringValues.size()]);
}
return new String[0];
}
public Collection getAllParameters() {
Collection results = new ArrayList();
rs = stmt.executeQuery();
// 結果セットからレコードを生成して返却
List r = new ArrayList();
while (rs.next()) {
r.add(creator.create(rs));
}
return r;
} catch (SQLException e) {
logger.fatal(e);
throw new DBException(e);
} finally {
closeResources(stmt, rs);
}
}
/**
* レコードを更新します。
* @param conn DB接続
* @param resource 更新するリソース情報(更新値もこの中に格納)
* @param updateIndices 更新するカラムのインデックス(配列)
* @param primaryIndex プライマリキーカラムのインデックス(更新条件として使用)
* @return 更新したレコード数
* @throws DBException DB例外
*/
public static int updateRecords(
Document doc = builder.parse(xmlIn);
Element root = doc.getDocumentElement();
XmlContextUtils.addValue(context, root);
} catch (ParserConfigurationException e) {
throw new IOException(e.getMessage());
} catch (SAXException e) {
throw new IOException(e.getMessage());
} catch (IOException e) {
throw e;
}
DBConnection conn, String sql, BindValues values, SqlExtInfo sqlExtInfo)
throws DBException {
DBPreparedStatement stmt = null;
ResultSet rs = null;
try {
// SQL文からステートメントを生成してSQL文発行
stmt = conn.prepareStatement(sql);
if (values != null) {
values.bind(stmt);
}
rs = stmt.executeQuery();
// SQL文からレコード生成情報を取得
SqlInfo sqlInfo = SqlParseUtils.parseSql(sql);
DBCreatable creator = sqlInfo.getCreator();
public static boolean equalYMD(Calendar cal, Date date) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
if (calendar.get(Calendar.YEAR) == cal.get(Calendar.YEAR)
&& calendar.get(Calendar.MONTH) == cal.get(Calendar.MONTH)
String filePath = info.getPath();
logger.debug("Commit to SVN :" + repository.getLocation().getPath() + filePath);
String dirPath = "";
if (filePath.lastIndexOf('/') >= 0) {
dirPath = filePath.substring(0, filePath.lastIndexOf('/'));
}
editor.openDir(dirPath, REVISION_HEAD);
public static long endProfile(Object key, String message) {
Long time = startTimes.get(key);
if (time != null) {
long passingTime = System.currentTimeMillis() - time.longValue();
logger.log(LimyLogLevel.PROFILE, message + " " + passingTime);