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

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

本文整理了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

  1. /**
  2. * Answers the unqualified class name for the specified object.
  3. */
  4. public static String getShortClassName(Object object) {
  5. return getShortClassName(object.getClass());
  6. }

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

  1. /**
  2. * INTERNAL:
  3. * Return the type that is appropriate for the indirection policy.
  4. */
  5. protected String validTypeName() {
  6. return Helper.getShortClassName(this.getContainerClass());
  7. }

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

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

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

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

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

  1. /**
  2. * INTERNAL:
  3. * Print the dom XML string.
  4. */
  5. public String toString() {
  6. StringWriter writer = new StringWriter();
  7. writer.write(Helper.getShortClassName(getClass()));
  8. writer.write("(");
  9. transformToWriter(writer);
  10. writer.write(")");
  11. return writer.toString();
  12. }

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

  1. /**
  2. * INTERNAL:
  3. */
  4. public String toString() {
  5. return Helper.getShortClassName(getClass()) + "(" + getDescriptor() + ")";
  6. }

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

  1. public String toString() {
  2. StringWriter writer = new StringWriter();
  3. writer.write(Helper.getShortClassName(getClass()));
  4. writer.write("(");
  5. writer.write(String.valueOf(getValue()));
  6. writer.write(")");
  7. return writer.toString();
  8. }
  9. }

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

  1. /**
  2. * PUBLIC:
  3. * Print connection string.
  4. */
  5. public String toString() {
  6. return Helper.getShortClassName(getClass()) + "(" + getConnectionString() + ")";
  7. }

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

  1. /**
  2. * INTERNAL:
  3. */
  4. public String toString() {
  5. return Helper.getShortClassName(getClass()) + "(" + getName() + ")";
  6. }

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

  1. /**
  2. * INTERNAL:
  3. * Return the type that is appropriate for the indirection policy.
  4. */
  5. protected String validTypeName() {
  6. return Helper.getShortClassName(this.getContainerClass());
  7. }

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

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

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

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

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

  1. /**
  2. * INTERNAL:
  3. * Print the SQL string.
  4. */
  5. public String toString() {
  6. String str = Helper.getShortClassName(getClass());
  7. if (getSQLString() == null) {
  8. return str;
  9. } else {
  10. return str + "(" + getSQLString() + ")";
  11. }
  12. }

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

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

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

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

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

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

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

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

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

  1. public String getSequenceTableName() {
  2. if (getDefaultSequence() instanceof TableSequence) {
  3. String tableName = ((TableSequence)getDefaultSequence()).getTableName();
  4. if(tableName.length() == 0) {
  5. tableName = this.getDefaultSequenceTableName();
  6. }
  7. return tableName;
  8. } else {
  9. throw ValidationException.wrongSequenceType(Helper.getShortClassName(getDefaultSequence()), "getTableName");
  10. }
  11. }

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

  1. public String getSequenceNameFieldName() {
  2. if (getDefaultSequence() instanceof TableSequence) {
  3. return ((TableSequence)getDefaultSequence()).getNameFieldName();
  4. } else {
  5. throw ValidationException.wrongSequenceType(Helper.getShortClassName(getDefaultSequence()), "getNameFieldName");
  6. }
  7. }

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

  1. /**
  2. * INTERNAL:
  3. */
  4. @Override
  5. public void prepareInternal(AbstractSession session) {
  6. if (session.getPlatform().supportsStoredFunctions()) {
  7. super.prepareInternal(session);
  8. } else {
  9. throw ValidationException.platformDoesNotSupportStoredFunctions(Helper.getShortClassName(session.getPlatform()));
  10. }
  11. }

相关文章

Helper类方法