gpt4 book ai didi

org.apache.openjpa.persistence.XMLPersistenceMetaDataParser.currentElement()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-20 09:41:40 25 4
gpt4 key购买 nike

本文整理了Java中org.apache.openjpa.persistence.XMLPersistenceMetaDataParser.currentElement()方法的一些代码示例,展示了XMLPersistenceMetaDataParser.currentElement()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLPersistenceMetaDataParser.currentElement()方法的具体详情如下:
包路径:org.apache.openjpa.persistence.XMLPersistenceMetaDataParser
类名称:XMLPersistenceMetaDataParser
方法名:currentElement

XMLPersistenceMetaDataParser.currentElement介绍

[英]Return the current element being parsed. May be a class metadata, field metadata, query metadata, etc.
[中]返回正在分析的当前元素。可以是类元数据、字段元数据、查询元数据等。

代码示例

代码示例来源:origin: org.apache.openjpa/openjpa-persistence

private void endExternalValues() 
  throws SAXException {
  FieldMetaData fmd = (FieldMetaData) currentElement();
  fmd.setExternalValues(_externalValues.toString());
  _externalValues = null;
}

代码示例来源:origin: org.apache.openjpa/openjpa-all

/**
 * Parse query-hint.
 */
protected boolean startQueryHint(Attributes attrs)
  throws SAXException {
  QueryMetaData meta = (QueryMetaData) currentElement();
  meta.addHint(attrs.getValue("name"), attrs.getValue("value"));
  return true;
}

代码示例来源:origin: org.apache.openjpa/openjpa-all

private boolean startExtendedStrategy(PersistenceStrategy ps, Attributes attrs) 
  throws SAXException {
  
  FieldMetaData fmd = (FieldMetaData) currentElement();
    parseExtendedStrategy(fmd, ps, attrs);
  
  return true;
}

代码示例来源:origin: org.apache.openjpa/openjpa-all

private void endExternalValues() 
  throws SAXException {
  FieldMetaData fmd = (FieldMetaData) currentElement();
  fmd.setExternalValues(_externalValues.toString());
  _externalValues = null;
}

代码示例来源:origin: org.apache.openjpa/openjpa-persistence

/**
 * Parse query-hint.
 */
protected boolean startQueryHint(Attributes attrs)
  throws SAXException {
  QueryMetaData meta = (QueryMetaData) currentElement();
  meta.addHint(attrs.getValue("name"), attrs.getValue("value"));
  return true;
}

代码示例来源:origin: org.apache.openejb.patch/openjpa-persistence

/**
 * Parse query-hint.
 */
protected boolean startQueryHint(Attributes attrs)
  throws SAXException {
  QueryMetaData meta = (QueryMetaData) currentElement();
  meta.addHint(attrs.getValue("name"), attrs.getValue("value"));
  return true;
}

代码示例来源:origin: org.apache.openejb.patch/openjpa-persistence

private boolean startExtendedStrategy(PersistenceStrategy ps, Attributes attrs) 
  throws SAXException {
  
  FieldMetaData fmd = (FieldMetaData) currentElement();
    parseExtendedStrategy(fmd, ps, attrs);
  
  return true;
}

代码示例来源:origin: org.apache.openejb.patch/openjpa

/**
 * Parse query-hint.
 */
protected boolean startQueryHint(Attributes attrs)
  throws SAXException {
  QueryMetaData meta = (QueryMetaData) currentElement();
  meta.addHint(attrs.getValue("name"), attrs.getValue("value"));
  return true;
}

代码示例来源:origin: org.apache.openjpa/com.springsource.org.apache.openjpa

/**
 * Parse order-by.
 */
private void endOrderBy()
  throws SAXException {
  FieldMetaData fmd = (FieldMetaData) currentElement();
  String dec = currentText();
  if (StringUtils.isEmpty(dec))
    dec = Order.ELEMENT + " asc";
  fmd.setOrderDeclaration(dec);
}

代码示例来源:origin: org.apache.openjpa/openjpa-all

protected void endQueryString()
  throws SAXException {
  QueryMetaData meta = (QueryMetaData) currentElement();
  meta.setQueryString(currentText());
}

代码示例来源:origin: org.apache.openjpa/openjpa-persistence

private void endFactory()
  throws SAXException {
  
  FieldMetaData fmd = (FieldMetaData) currentElement();
  String factory = currentText();
  fmd.setFactory(factory);
}

代码示例来源:origin: org.apache.openejb.patch/openjpa-persistence

protected void endQueryString()
  throws SAXException {
  QueryMetaData meta = (QueryMetaData) currentElement();
  meta.setQueryString(currentText());
}

代码示例来源:origin: org.apache.openejb.patch/openjpa-persistence

private void endEntityListener()
  throws SAXException {
  // should be in endEntityListeners I think to merge callbacks
  // into a single listener.  But then the user cannot remove.
  if (currentElement() == null && _callbacks != null) {
    _repos.addSystemListener(new PersistenceListenerAdapter
      (_callbacks));
    _callbacks = null;
  }
  _listener = null;
}

代码示例来源:origin: org.apache.openjpa/com.springsource.org.apache.openjpa

private void endEntityListener()
  throws SAXException {
  // should be in endEntityListeners I think to merge callbacks
  // into a single listener.  But then the user cannot remove.
  if (currentElement() == null && _callbacks != null) {
    _repos.addSystemListener(new PersistenceListenerAdapter
      (_callbacks));
    _callbacks = null;
  }
  _listener = null;
}

代码示例来源:origin: org.apache.openjpa/com.springsource.org.apache.openjpa

protected void endQueryString()
  throws SAXException {
  QueryMetaData meta = (QueryMetaData) currentElement();
  meta.setQueryString(currentText());
}

代码示例来源:origin: org.apache.openejb.patch/openjpa

private void endFactory()
  throws SAXException {
  
  FieldMetaData fmd = (FieldMetaData) currentElement();
  String factory = currentText();
  fmd.setFactory(factory);
}

代码示例来源:origin: org.apache.openjpa/openjpa-persistence

/**
 * Parse exclude-default-listeners.
 */
private boolean startExcludeDefaultListeners(Attributes attrs)
  throws SAXException {
  if (!isMetaDataMode())
    return false;
  ClassMetaData meta = (ClassMetaData) currentElement();
  meta.getLifecycleMetaData().setIgnoreSystemListeners(true);
  return true;
}

代码示例来源:origin: org.apache.openjpa/openjpa-persistence

/**
 * Parse exclude-superclass-listeners.
 */
private boolean startExcludeSuperclassListeners(Attributes attrs)
  throws SAXException {
  if (!isMetaDataMode())
    return false;
  ClassMetaData meta = (ClassMetaData) currentElement();
  meta.getLifecycleMetaData().setIgnoreSuperclassCallbacks
    (LifecycleMetaData.IGNORE_HIGH);
  return true;
}

代码示例来源:origin: org.apache.openejb.patch/openjpa-persistence

/**
 * Parse exclude-default-listeners.
 */
private boolean startExcludeDefaultListeners(Attributes attrs)
  throws SAXException {
  if (!isMetaDataMode())
    return false;
  ClassMetaData meta = (ClassMetaData) currentElement();
  meta.getLifecycleMetaData().setIgnoreSystemListeners(true);
  return true;
}

代码示例来源:origin: org.apache.openejb.patch/openjpa

/**
 * Parse exclude-superclass-listeners.
 */
private boolean startExcludeSuperclassListeners(Attributes attrs)
  throws SAXException {
  if (!isMetaDataMode())
    return false;
  ClassMetaData meta = (ClassMetaData) currentElement();
  meta.getLifecycleMetaData().setIgnoreSuperclassCallbacks
    (LifecycleMetaData.IGNORE_HIGH);
  return true;
}

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com