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

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

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

Helper.getShortClassName介绍

[英]Answers the unqualified class name for the provided class.
[中]回答所提供类的非限定类名。

代码示例

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

/**
 *    Answers the unqualified class name for the specified object.
 */
public static String getShortClassName(Object object) {
  return getShortClassName(object.getClass());
}

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

/**
 * INTERNAL:
 *    Return the type that is appropriate for the indirection policy.
 */
protected String validTypeName() {
  return Helper.getShortClassName(this.getContainerClass());
}

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

/**
 * INTERNAL:
 * A UnitOfWork can not be acquired from a Historical Session.
 */
public UnitOfWorkImpl acquireUnitOfWork() {
  throw ValidationException.operationNotSupported(Helper.getShortClassName(getClass()) + ".acquireUnitOfWork");
}

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

/**
 * INTERNAL:
 * No transactions should be used inside a HistoricalSession.
 */
public void rollbackTransaction() throws DatabaseException, ConcurrencyException {
  throw ValidationException.operationNotSupported(Helper.getShortClassName(getClass()) + ".rollbackTransaction");
}

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

/**
 * INTERNAL:
 * Print the dom XML string.
 */
public String toString() {
  StringWriter writer = new StringWriter();
  writer.write(Helper.getShortClassName(getClass()));
  writer.write("(");
  transformToWriter(writer);
  writer.write(")");
  return writer.toString();
}

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

/**
 * INTERNAL:
 */
public String toString() {
  return Helper.getShortClassName(getClass()) + "(" + getDescriptor() + ")";
}

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

public String toString() {
    StringWriter writer = new StringWriter();
    writer.write(Helper.getShortClassName(getClass()));
    writer.write("(");
    writer.write(String.valueOf(getValue()));
    writer.write(")");
    return writer.toString();
  }
}

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

/**
 * PUBLIC:
 * Print connection string.
 */
public String toString() {
  return Helper.getShortClassName(getClass()) + "(" + getConnectionString() + ")";
}

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

/**
 * INTERNAL:
 */
public String toString() {
  return Helper.getShortClassName(getClass()) + "(" + getName() + ")";
}

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

/**
 * INTERNAL:
 *    Return the type that is appropriate for the indirection policy.
 */
protected String validTypeName() {
  return Helper.getShortClassName(this.getContainerClass());
}

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

/**
 * INTERNAL:
 */
protected void createDisplayString() {
  this.displayString = Helper.getShortClassName(this) + "[" + serviceId.toString() + ", topic " + topicName +"]";
}

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

/**
   * INTERNAL:
   * Print something useful on the log.
   */
  public void toString(java.io.PrintWriter writer) {
    writer.print(ToStringLocalization.buildMessage("connector", (Object[])null) + "=>" + Helper.getShortClassName(getClass()));
    writer.print(" ");
    writer.println(ToStringLocalization.buildMessage("datasource_name", (Object[])null) + "=>" + getName());
  }
}

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

/**
 * INTERNAL:
 * Print the SQL string.
 */
public String toString() {
  String str = Helper.getShortClassName(getClass());
  if (getSQLString() == null) {
    return str;
  } else {
    return str + "(" + getSQLString() + ")";
  }
}

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

@Override
  public String toString() {
    String parentName = getParentClass() == null ? getParentClassName() : getParentClass().getName();
    return Helper.getShortClassName(getClass()) + "(" + parentName + ")";
  }
}

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

public String toString() {
  if (isInstantiated()) {
    return "{" + getValue() + "}";
  } else {
    return "{" + Helper.getShortClassName(getClass()) + ": " + ToStringLocalization.buildMessage("not_instantiated", (Object[])null) + "}";
  }
}

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

public static DescriptorException couldNotInstantiateIndirectContainerClass(Class containerClass, Exception exception) {
  Object[] args = { containerClass, Helper.getShortClassName(containerClass) };
  DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, COULD_NOT_INSTANTIATE_INDIRECT_CONTAINER_CLASS, args));
  descriptorException.setErrorCode(COULD_NOT_INSTANTIATE_INDIRECT_CONTAINER_CLASS);
  descriptorException.setInternalException(exception);
  return descriptorException;
}

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

/**
 * INTERNAL: Generates the object level stored procedure based on the passed in query
 */
protected StoredProcedureDefinition generateObjectStoredProcedure(DatabaseQuery query, List fields, String namePrefix) {
  String className = Helper.getShortClassName(query.getDescriptor().getJavaClass());
  return generateStoredProcedure(query, fields, getPrefix() + namePrefix + className);
}

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

public String getSequenceTableName() {
  if (getDefaultSequence() instanceof TableSequence) {
    String tableName = ((TableSequence)getDefaultSequence()).getTableName();
    if(tableName.length() == 0) {
      tableName = this.getDefaultSequenceTableName();
    }
    return tableName;
  } else {
    throw ValidationException.wrongSequenceType(Helper.getShortClassName(getDefaultSequence()), "getTableName");
  }
}

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

public String getSequenceNameFieldName() {
  if (getDefaultSequence() instanceof TableSequence) {
    return ((TableSequence)getDefaultSequence()).getNameFieldName();
  } else {
    throw ValidationException.wrongSequenceType(Helper.getShortClassName(getDefaultSequence()), "getNameFieldName");
  }
}

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

/**
 * INTERNAL:
 */
@Override
public void prepareInternal(AbstractSession session) {
  if (session.getPlatform().supportsStoredFunctions()) {
    super.prepareInternal(session);
  } else {
    throw ValidationException.platformDoesNotSupportStoredFunctions(Helper.getShortClassName(session.getPlatform()));
  }
}

相关文章

Helper类方法