public List getSongs(Long artistId) {
return getHibernateTemplate().find("from Song as song where song.artist.id = ?", new Object [] {artistId});
}
Thursday, February 26, 2009
Wednesday, February 25, 2009
Use regexp in Digester
How to configure Digester to use reg exp pattern like *
<pattern value="*AddRs">
...
<pattern>
URL rulesXml = getClass().getClassLoader().getResource(path);
RuleSet ruleSet = new FromXmlRuleSet(rulesXml);
Digester digester = new Digester();
digester.setRules(new RegexRules(new SimpleRegexMatcher()));
digester.addRuleSet(ruleSet);
return digester;
...
URL rulesXml = getClass().getClassLoader().getResource(path);
RuleSet ruleSet = new FromXmlRuleSet(rulesXml);
Digester digester = new Digester();
digester.setRules(new RegexRules(new SimpleRegexMatcher()));
digester.addRuleSet(ruleSet);
return digester;
Maven dependency tree
set JAVA_HOME=C:\jdk1.6.0
set MAVEN_HOME=D:\java\apache-maven-2.0.9
%MAVEN_HOME%\bin\mvn dependency:tree > dep.txt
set MAVEN_HOME=D:\java\apache-maven-2.0.9
%MAVEN_HOME%\bin\mvn dependency:tree > dep.txt
Subscribe to:
Posts (Atom)