本文整理汇总了Java中org.hibernate.annotations.common.util.StringHelper类的典型用法代码示例。如果您正苦于以下问题:Java StringHelper类的具体用法?Java StringHelper怎么用?Java StringHelper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
StringHelper类属于org.hibernate.annotations.common.util包,在下文中一共展示了StringHelper类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getQueryHintString
import org.hibernate.annotations.common.util.StringHelper; //导入依赖的package包/类
@Override
public String getQueryHintString(String sql, List<String> hints) {
final String hint = StringHelper.join( ", ", hints.iterator() );
if ( StringHelper.isEmpty( hint ) ) {
return sql;
}
final int pos = sql.indexOf( "select" );
if ( pos > -1 ) {
final StringBuilder buffer = new StringBuilder( sql.length() + hint.length() + 8 );
if ( pos > 0 ) {
buffer.append( sql.substring( 0, pos ) );
}
buffer.append( "select /*+ " ).append( hint ).append( " */" )
.append( sql.substring( pos + "select".length() ) );
sql = buffer.toString();
}
return sql;
}
开发者ID:lamsfoundation,项目名称:lams,代码行数:22,代码来源:Oracle8iDialect.java
示例2: fillDataSetAndDataPathProperty
import org.hibernate.annotations.common.util.StringHelper; //导入依赖的package包/类
protected void fillDataSetAndDataPathProperty(Element element,ComponentInfo component,boolean isCollection){
String[] dataSetDataPath=this.retriveDataSetAndDataPath(component);
if(dataSetDataPath!=null){
if(StringHelper.isNotEmpty(dataSetDataPath[0])){
BaseElement dataSetElement=new BaseElement("Property");
dataSetElement.addAttribute("name", "dataSet");
dataSetElement.setText(dataSetDataPath[0]);
element.add(dataSetElement);
}
if(StringHelper.isNotEmpty(dataSetDataPath[1]) && !hasDataPath(component)){
BaseElement dataPathElement=new BaseElement("Property");
dataPathElement.addAttribute("name", "dataPath");
String dataPath=dataSetDataPath[1];
if(!isCollection){
int pos=dataPath.lastIndexOf(".");
if(pos>0){
dataPath=dataPath.substring(0,pos)+".#"+dataPath.substring(pos+1,dataPath.length());
}
}
dataPathElement.setText(dataPath);
element.add(dataPathElement);
}
}
}
开发者ID:bsteker,项目名称:bdf2,代码行数:26,代码来源:AbstractConverter.java
示例3: buildLayoutContraint
import org.hibernate.annotations.common.util.StringHelper; //导入依赖的package包/类
private String buildLayoutContraint(ComponentInfo component){
StringBuffer sb=new StringBuffer();
if(component.getLayoutConstraintProperties()!=null){
int i=0;
for(LayoutConstraintProperty lcp:component.getLayoutConstraintProperties()){
if(StringHelper.isNotEmpty(lcp.getName()) && StringHelper.isNotEmpty(lcp.getValue())){
if(i>0){
sb.append(";");
}
sb.append(lcp.getName()+":"+lcp.getValue());
i++;
}
}
}
if(sb.length()>0){
return sb.toString();
}else{
return null;
}
}
开发者ID:bsteker,项目名称:bdf2,代码行数:21,代码来源:AbstractConverter.java
示例4: getTopEntity
import org.hibernate.annotations.common.util.StringHelper; //导入依赖的package包/类
private Entity getTopEntity(Entity entity,StringBuffer dataPath){
if(StringHelper.isEmpty(entity.getParentId())){
if(dataPath.length()>0){
dataPath.insert(0, "#");
}
return entity;
}else{
int pointPos=dataPath.indexOf(".");
if(pointPos==-1){
dataPath.insert(0, "."+entity.getName());
}else{
dataPath.insert(0, ".#"+entity.getName());
}
return getTopEntity(entityManager.loadEntity(entity.getParentId()),dataPath);
}
}
开发者ID:bsteker,项目名称:bdf2,代码行数:17,代码来源:AbstractConverter.java
示例5: convert
import org.hibernate.annotations.common.util.StringHelper; //导入依赖的package包/类
public Element convert(ComponentInfo component, RuleSet ruleSet,
Element rootElement) throws Exception {
String name=MenuItem.class.getSimpleName();
XmlNode node=MenuItem.class.getAnnotation(XmlNode.class);
if(node!=null && StringHelper.isNotEmpty(node.nodeName())){
name=node.nodeName();
}
Rule rule=ruleSet.getRule(name);
BaseElement element = fillElement(component,ruleSet,rule,rootElement);
if(component.getChildren()!=null){
for(ComponentInfo c:component.getChildren()){
this.buildChildren(element,c,ruleSet,rootElement);
}
}
return element;
}
开发者ID:bsteker,项目名称:bdf2,代码行数:17,代码来源:MenuItemConverter.java
示例6: convert
import org.hibernate.annotations.common.util.StringHelper; //导入依赖的package包/类
public Element convert(ComponentInfo component, RuleSet ruleSet,
Element rootElement) throws Exception {
String name=Dialog.class.getSimpleName();
XmlNode node=Dialog.class.getAnnotation(XmlNode.class);
if(node!=null && StringHelper.isNotEmpty(node.nodeName())){
name=node.nodeName();
}
Rule rule=ruleSet.getRule(name);
BaseElement element = fillElement(component,ruleSet,rule,rootElement);
if(component.getChildren()!=null){
for(ComponentInfo c:component.getChildren()){
this.buildChildren(element,c,ruleSet,rootElement);
}
}
return element;
}
开发者ID:bsteker,项目名称:bdf2,代码行数:17,代码来源:DialogConverter.java
示例7: convert
import org.hibernate.annotations.common.util.StringHelper; //导入依赖的package包/类
public Element convert(ComponentInfo component, RuleSet ruleSet,
Element rootElement) throws Exception {
String name=ToolBar.class.getSimpleName();
XmlNode node=ToolBar.class.getAnnotation(XmlNode.class);
if(node!=null && StringHelper.isNotEmpty(node.nodeName())){
name=node.nodeName();
}
Rule rule=ruleSet.getRule(name);
BaseElement element = fillElement(component,ruleSet,rule,rootElement);
if(component.getChildren()!=null){
for(ComponentInfo c:component.getChildren()){
this.buildChildren(element,c,ruleSet,rootElement);
}
}
return element;
}
开发者ID:bsteker,项目名称:bdf2,代码行数:17,代码来源:ToolBarConverter.java
示例8: convert
import org.hibernate.annotations.common.util.StringHelper; //导入依赖的package包/类
public Element convert(ComponentInfo component, RuleSet ruleSet,Element rootElement)
throws Exception {
String name=DataColumn.class.getSimpleName();
XmlNode node=DataColumn.class.getAnnotation(XmlNode.class);
if(node!=null && StringHelper.isNotEmpty(node.nodeName())){
name=node.nodeName();
}
Rule rule=ruleSet.getRule(name);
BaseElement element = fillElement(component,ruleSet,rule,rootElement);
boolean addProperty=true;
for(ComponentProperty cp:component.getComponentProperties()){
if(cp.getName().equals("property")){
addProperty=false;
break;
}
}
if(addProperty){
BaseElement propertyElement=new BaseElement("Property");
propertyElement.addAttribute("name","property");
propertyElement.setText(component.getName());
element.add(propertyElement);
}
return element;
}
开发者ID:bsteker,项目名称:bdf2,代码行数:27,代码来源:DataColumnConverter.java
示例9: convert
import org.hibernate.annotations.common.util.StringHelper; //导入依赖的package包/类
public Element convert(ComponentInfo component, RuleSet ruleSet,
Element rootElement) throws Exception {
String name=Accordion.class.getSimpleName();
XmlNode node=Accordion.class.getAnnotation(XmlNode.class);
if(node!=null && StringHelper.isNotEmpty(node.nodeName())){
name=node.nodeName();
}
Rule rule=ruleSet.getRule(name);
BaseElement element = fillElement(component,ruleSet,rule,rootElement);
if(component.getChildren()!=null){
for(ComponentInfo c:component.getChildren()){
this.buildChildren(element,c,ruleSet,rootElement);
}
}
return element;
}
开发者ID:bsteker,项目名称:bdf2,代码行数:17,代码来源:AccordionConverter.java
示例10: convert
import org.hibernate.annotations.common.util.StringHelper; //导入依赖的package包/类
public Element convert(ComponentInfo component, RuleSet ruleSet,
Element rootElement) throws Exception {
String name=CustomDropDown.class.getSimpleName();
XmlNode node=CustomDropDown.class.getAnnotation(XmlNode.class);
if(node!=null && StringHelper.isNotEmpty(node.nodeName())){
name=node.nodeName();
}
Rule rule=ruleSet.getRule(name);
BaseElement element = fillElement(component,ruleSet,rule,rootElement);
if(component.getChildren()!=null){
for(ComponentInfo c:component.getChildren()){
this.buildChildren(element,c,ruleSet,rootElement);
}
}
return element;
}
开发者ID:bsteker,项目名称:bdf2,代码行数:17,代码来源:CustomDropDownConverter.java
示例11: convert
import org.hibernate.annotations.common.util.StringHelper; //导入依赖的package包/类
public Element convert(ComponentInfo component, RuleSet ruleSet,
Element rootElement) throws Exception {
String name=DataTree.class.getSimpleName();
XmlNode node=DataTree.class.getAnnotation(XmlNode.class);
if(node!=null && StringHelper.isNotEmpty(node.nodeName())){
name=node.nodeName();
}
Rule rule=ruleSet.getRule(name);
BaseElement element = fillElement(component,ruleSet,rule,rootElement);
this.fillDataSetAndDataPathProperty(element, component,true);
if(component.getChildren()!=null){
for(ComponentInfo c:component.getChildren()){
this.buildChildren(element,c,ruleSet,rootElement);
}
}
return element;
}
开发者ID:bsteker,项目名称:bdf2,代码行数:18,代码来源:DataTreeConverter.java
示例12: convert
import org.hibernate.annotations.common.util.StringHelper; //导入依赖的package包/类
public Element convert(ComponentInfo component, RuleSet ruleSet,
Element rootElement) throws Exception {
String name=SplitPanel.class.getSimpleName();
XmlNode node=SplitPanel.class.getAnnotation(XmlNode.class);
if(node!=null && StringHelper.isNotEmpty(node.nodeName())){
name=node.nodeName();
}
Rule rule=ruleSet.getRule(name);
BaseElement element = fillElement(component,ruleSet,rule,rootElement);
if(component.getChildren()!=null){
for(ComponentInfo c:component.getChildren()){
this.buildChildren(element,c,ruleSet,rootElement);
}
}
return element;
}
开发者ID:bsteker,项目名称:bdf2,代码行数:17,代码来源:SplitPanelConverter.java
示例13: convert
import org.hibernate.annotations.common.util.StringHelper; //导入依赖的package包/类
public Element convert(ComponentInfo component, RuleSet ruleSet,
Element rootElement) throws Exception {
String name=Section.class.getSimpleName();
XmlNode node=Section.class.getAnnotation(XmlNode.class);
if(node!=null && StringHelper.isNotEmpty(node.nodeName())){
name=node.nodeName();
}
Rule rule=ruleSet.getRule(name);
BaseElement element = fillElement(component,ruleSet,rule,rootElement);
if(component.getChildren()!=null){
for(ComponentInfo c:component.getChildren()){
this.buildChildren(element,c,ruleSet,rootElement);
}
}
return element;
}
开发者ID:bsteker,项目名称:bdf2,代码行数:17,代码来源:SectionConverter.java
示例14: convert
import org.hibernate.annotations.common.util.StringHelper; //导入依赖的package包/类
public Element convert(ComponentInfo component, RuleSet ruleSet,
Element rootElement) throws Exception {
String name=ControlTab.class.getSimpleName();
XmlNode node=ControlTab.class.getAnnotation(XmlNode.class);
if(node!=null && StringHelper.isNotEmpty(node.nodeName())){
name=node.nodeName();
}
Rule rule=ruleSet.getRule(name);
BaseElement element = fillElement(component,ruleSet,rule,rootElement);
if(component.getChildren()!=null){
for(ComponentInfo c:component.getChildren()){
this.buildChildren(element,c,ruleSet,rootElement);
}
}
return element;
}
开发者ID:bsteker,项目名称:bdf2,代码行数:17,代码来源:ControlTabConverter.java
示例15: convert
import org.hibernate.annotations.common.util.StringHelper; //导入依赖的package包/类
public Element convert(ComponentInfo component, RuleSet ruleSet,Element rootElement)
throws Exception {
String name=DataGrid.class.getSimpleName();
XmlNode node=DataGrid.class.getAnnotation(XmlNode.class);
if(node!=null && StringHelper.isNotEmpty(node.nodeName())){
name=node.nodeName();
}
Rule rule=ruleSet.getRule(name);
BaseElement element = fillElement(component,ruleSet,rule,rootElement);
this.fillDataSetAndDataPathProperty(element, component,true);
if(component.getChildren()!=null){
for(ComponentInfo c:component.getChildren()){
this.buildChildren(element,c,ruleSet,rootElement);
}
}
return element;
}
开发者ID:bsteker,项目名称:bdf2,代码行数:18,代码来源:DataGridConverter.java
示例16: convert
import org.hibernate.annotations.common.util.StringHelper; //导入依赖的package包/类
public Element convert(ComponentInfo component, RuleSet ruleSet,Element rootElement)
throws Exception {
String name=AutoForm.class.getSimpleName();
XmlNode node=AutoForm.class.getAnnotation(XmlNode.class);
if(node!=null && StringHelper.isNotEmpty(node.nodeName())){
name=node.nodeName();
}
Rule rule=ruleSet.getRule(name);
BaseElement element = fillElement(component,ruleSet,rule,rootElement);
this.fillDataSetAndDataPathProperty(element, component,false);
if(component.getChildren()!=null){
for(ComponentInfo c:component.getChildren()){
this.buildChildren(element,c,ruleSet,rootElement);
}
}
return element;
}
开发者ID:bsteker,项目名称:bdf2,代码行数:19,代码来源:AutoFormConverter.java
示例17: convert
import org.hibernate.annotations.common.util.StringHelper; //导入依赖的package包/类
public Element convert(ComponentInfo component, RuleSet ruleSet,
Element rootElement) throws Exception {
String name=Container.class.getSimpleName();
XmlNode node=Container.class.getAnnotation(XmlNode.class);
if(node!=null && StringHelper.isNotEmpty(node.nodeName())){
name=node.nodeName();
}
Rule rule=ruleSet.getRule(name);
BaseElement element = fillElement(component,ruleSet,rule,rootElement);
if(component.getChildren()!=null){
for(ComponentInfo c:component.getChildren()){
this.buildChildren(element,c,ruleSet,rootElement);
}
}
return element;
}
开发者ID:bsteker,项目名称:bdf2,代码行数:17,代码来源:ContainerConverter.java
示例18: convert
import org.hibernate.annotations.common.util.StringHelper; //导入依赖的package包/类
public Element convert(ComponentInfo component, RuleSet ruleSet,
Element rootElement) throws Exception {
String name=Menu.class.getSimpleName();
XmlNode node=Menu.class.getAnnotation(XmlNode.class);
if(node!=null && StringHelper.isNotEmpty(node.nodeName())){
name=node.nodeName();
}
Rule rule=ruleSet.getRule(name);
BaseElement element = fillElement(component,ruleSet,rule,rootElement);
if(component.getChildren()!=null){
for(ComponentInfo c:component.getChildren()){
this.buildChildren(element,c,ruleSet,rootElement);
}
}
return element;
}
开发者ID:bsteker,项目名称:bdf2,代码行数:17,代码来源:MenuConverter.java
示例19: convert
import org.hibernate.annotations.common.util.StringHelper; //导入依赖的package包/类
public Element convert(ComponentInfo component, RuleSet ruleSet,
Element rootElement) throws Exception {
String name=RadioGroup.class.getSimpleName();
XmlNode node=RadioGroup.class.getAnnotation(XmlNode.class);
if(node!=null && StringHelper.isNotEmpty(node.nodeName())){
name=node.nodeName();
}
Rule rule=ruleSet.getRule(name);
BaseElement element = fillElement(component,ruleSet,rule,rootElement);
this.fillDataSetAndDataPathProperty(element, component,false);
if(component.getChildren()!=null){
for(ComponentInfo c:component.getChildren()){
this.buildChildren(element,c,ruleSet,rootElement);
}
}
return element;
}
开发者ID:bsteker,项目名称:bdf2,代码行数:18,代码来源:RadioGroupConverter.java
示例20: convert
import org.hibernate.annotations.common.util.StringHelper; //导入依赖的package包/类
public Element convert(ComponentInfo component, RuleSet ruleSet,
Element rootElement) throws Exception {
String name=ColumnGroup.class.getSimpleName();
XmlNode node=ColumnGroup.class.getAnnotation(XmlNode.class);
if(node!=null && StringHelper.isNotEmpty(node.nodeName())){
name=node.nodeName();
}
Rule rule=ruleSet.getRule(name);
BaseElement element = fillElement(component,ruleSet,rule,rootElement);
if(component.getChildren()!=null){
for(ComponentInfo c:component.getChildren()){
this.buildChildren(element,c,ruleSet,rootElement);
}
}
return element;
}
开发者ID:bsteker,项目名称:bdf2,代码行数:17,代码来源:ColumnGroupConverter.java
注:本文中的org.hibernate.annotations.common.util.StringHelper类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论