net.sf.nakeduml.javageneration.hibernate.hbm.HbmTextSource Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of metamodel Show documentation
Show all versions of metamodel Show documentation
A uml code generator and execution engine
The newest version!
package net.sf.nakeduml.javageneration.hibernate.hbm;
import net.hibernatehbmmetamodel.HibernateConfiguration;
import net.sf.nakeduml.textmetamodel.TextSource;
public class HbmTextSource implements TextSource {
public static final String GEN_RESOURCE = "gen-resource";
HibernateConfiguration hibernateConfiguration;
public HbmTextSource(HibernateConfiguration hibernateConfiguration) {
super();
this.hibernateConfiguration = hibernateConfiguration;
}
public char[] toCharArray() {
String s = hibernateConfiguration.getHbmString2();
return s.toCharArray();
}
public boolean hasContent(){
StringBuffer sb = new StringBuffer();
String s = hibernateConfiguration.getHbmString2();
sb.append(s);
return sb.length()>0;
}
}