org.eclipse.persistence.internal.helper.Helper.cr()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(6.6k)|赞(0)|评价(0)|浏览(179)

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

Helper.cr介绍

[英]Return a string containing the platform-appropriate characters for carriage return.
[中]返回一个字符串,该字符串包含用于回车的平台适当字符。

代码示例

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * Convenience method - return a platform-specific line-feed.
 */
protected static String cr() {
  return org.eclipse.persistence.internal.helper.Helper.cr();
}

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL:
 * Convenience method - return a platform-specific line-feed.
 */
protected static String cr() {
  return org.eclipse.persistence.internal.helper.Helper.cr();
}

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 * Convenience method - return a platform-specific line-feed.
 */
protected static String cr() {
  return org.eclipse.persistence.internal.helper.Helper.cr();
}

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

private String constructValidSQLorEJBQLLinesForJavaSource(String qlString){
  //Bug2612384 Deals with the possibility of multi-line SQL statements.
  //Expects beginning and closing quotes to be in place
  if (qlString != null) {
    String insertString = "\" " + Helper.cr() + '\t' + '\t' + "+ " + "\"";
    qlString = qlString.trim().replaceAll("\n", insertString);
  }
  return qlString;
}

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

private String constructValidSQLorEJBQLLinesForJavaSource(String qlString){
  //Bug2612384 Deals with the possibility of multi-line SQL statements.
  //Expects beginning and closing quotes to be in place
  String insertString = "\" " + Helper.cr() + '\t' + '\t' + "+ " + "\"";
  
  if (qlString != null) {
    qlString.trim();
    //remove trailing carraige returns
    while (qlString.endsWith("\n"))
      qlString = qlString.substring(0, qlString.length() - 1);
    
    qlString = qlString.replaceAll("\n",insertString);
  }
  return qlString;
}

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

private String constructValidSQLorEJBQLLinesForJavaSource(String qlString){
  //Bug2612384 Deals with the possibility of multi-line SQL statements.
  //Expects beginning and closing quotes to be in place
  String insertString = "\" " + Helper.cr() + '\t' + '\t' + "+ " + "\"";
  
  if (qlString != null) {
    qlString.trim();
    //remove trailing carraige returns
    while (qlString.endsWith("\n"))
      qlString = qlString.substring(0, qlString.length() - 1);
    
    qlString = qlString.replaceAll("\n",insertString);
  }
  return qlString;
}

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

public String getMessage() {
  StringBuffer buffer = new StringBuffer();
  Exception nestedException;
  for (int x=0; x<m_nestedExceptions.size(); x++) {
    nestedException = (Exception) m_nestedExceptions.get(x);
    buffer.append(Helper.cr());
    buffer.append('(');
    buffer.append(x + 1);
    buffer.append(". ");
    buffer.append(nestedException.getMessage());
    buffer.append(')');
  }
  return buffer.toString();
}

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 */
public void endDocument() {
  try {
    writer.write(Helper.cr());    
  } catch (IOException e) {
    throw XMLMarshalException.marshalException(e);
  }
}

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

public void cr() {
  write(Helper.cr());
}

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

public void cr() {
  write(Helper.cr());
}

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * Get the line separator character.
 * Previous versions of TopLink always did this in a privileged block so we will continue to do so.
 */
public static String getLineSeparator() {
  if (shouldUsePrivilegedAccess()) {
    return (String)AccessController.doPrivileged(new PrivilegedAction() {
        public Object run() {
          return System.getProperty("file.separator");
        }
      });
  } else {
    return org.eclipse.persistence.internal.helper.Helper.cr();
  }
}

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

public void cr() {
  write(Helper.cr());
}

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

/**
 * Print the connection status with the session.
 */
public String toString() {
  StringWriter writer = new StringWriter();
  writer.write(getSessionTypeString() + "(" + Helper.cr() + "\t" + getAccessor() + Helper.cr() + "\t" + getDatasourcePlatform() + ")");
  return writer.toString();
}

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * Print the connection status with the session.
 */
public String toString() {
  StringWriter writer = new StringWriter();
  writer.write(getSessionTypeString() + "(" + Helper.cr() + "\t" + getAccessor() + Helper.cr() + "\t" + getDatasourcePlatform() + ")");
  return writer.toString();
}

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * Print the connection status with the session.
 */
@Override
public String toString() {
  StringWriter writer = new StringWriter();
  writer.write(getSessionTypeString() + "(" + Helper.cr() + "\t" + getAccessor() + Helper.cr() + "\t" + getDatasourcePlatform() + ")");
  return writer.toString();
}

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

/**
 * Get the line separator character.
 * Previous versions of TopLink always did this in a privileged block so we will continue to do so.
 */
public static String getLineSeparator() {
  if (shouldUsePrivilegedAccess()) {
    return AccessController.doPrivileged(new PrivilegedGetSystemProperty("file.separator"));
  } else {
    return org.eclipse.persistence.internal.helper.Helper.cr();
  }
}

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

public void comment(char[] ch, int start, int length) throws SAXException {
    try {
      if (isStartElementOpen) {
        writer.write('>');
        writer.write(Helper.cr());
        isStartElementOpen = false;
      }
      writeComment(ch, start, length);
      complexType = false;
    } catch (IOException e) {
      throw XMLMarshalException.marshalException(e);
    }
}
}

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * PUBLIC:
 * Log a profile summary.
 */
public void logProfileSummary() {
  Writer writer = getSession().getLog();
  try {
    writer.write(buildProfileSummary().toString());
    writer.write(Helper.cr());
  } catch (IOException ioe) {
  }
}

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

/**
 * PUBLIC:
 * Log a profile summary.
 */
public void logProfileSummary() {
  Writer writer = getSession().getLog();
  try {
    writer.write(buildProfileSummary().toString());
    writer.write(Helper.cr());
  } catch (IOException ioe) {
  }
}

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * PUBLIC:
 * Log a profile summary.
 */
public void logProfileSummary() {
  Writer writer = getSession().getLog();
  try {
    writer.write(buildProfileSummary().toString());
    writer.write(Helper.cr());
  } catch (IOException ioe) {
  }
}

相关文章

Helper类方法