热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

org.eclipse.persistence.internal.sessions.AbstractSession.getDescriptorForAlias()方法的使用及代码示例

本文整理了Java中org.eclipse.persistence.internal.sessions.AbstractSession.getDescriptorForAlias()

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

AbstractSession.getDescriptorForAlias介绍

[英]PUBLIC: Return the descriptor for the alias
[中]PUBLIC:返回别名的描述符

代码示例

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

/**
* Retrieves the descriptor associated with the given abstract schema name, which is the
* descriptor's alias.
*
* @param abstractSchemaName The managed type name associated with the managed type
* @return The EclipseLink {@link ClassDescriptor descriptor} representing the managed type
*/
ClassDescriptor getDescriptor(String abstractSchemaName) {
return getSession().getDescriptorForAlias(abstractSchemaName);
}

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

/** Returns the type of the class corresponding to the specified abstract
* schema type.
*/
public Object resolveSchema(String schemaName) {
ClassDescriptor descriptor = session.getDescriptorForAlias(schemaName);
return (descriptor != null) ? descriptor.getJavaClass() : null;
}

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

/** Returns the type of the class corresponding to the specified abstract
* schema type.
*/
public Object resolveSchema(String schemaName) {
ClassDescriptor descriptor = session.getDescriptorForAlias(schemaName);
return (descriptor != null) ? descriptor.getJavaClass() : null;
}

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

/**
* Retrieves the descriptor associated with the given abstract schema name, which is the
* descriptor's alias.
*
* @param abstractSchemaName The managed type name associated with the managed type
* @return The EclipseLink {@link ClassDescriptor descriptor} representing the managed type
*/
ClassDescriptor getDescriptor(String abstractSchemaName) {
return getSession().getDescriptorForAlias(abstractSchemaName);
}

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

/** Returns the type of the class corresponding to the specified abstract
* schema type.
*/
public Object resolveSchema(String schemaName) {
ClassDescriptor descriptor = session.getDescriptorForAlias(schemaName);
return (descriptor != null) ? descriptor.getJavaClass() : null;
}

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

/**
* Return the table descriptor specified for the class.
*/
@Override
public ClassDescriptor getDescriptorForAlias(String alias) {
return getParent().getDescriptorForAlias(alias);
}

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

/**
* Return the table descriptor specified for the class.
*/
@Override
public ClassDescriptor getDescriptorForAlias(String alias) {
return getParent().getDescriptorForAlias(alias);
}

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

String customizerClassName = (String)entry.getValue();
ClassDescriptor descriptor = session.getDescriptorForAlias(name);
if (descriptor == null) {
try {

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

/**
* Extract descriptor from the session
*/
public Transporter getDescriptorForAlias(Transporter remoteTransporter) {
String alias = (String)remoteTransporter.getObject();
Transporter transporter = new Transporter();
try {
ClassDescriptor descriptor = getSession().getDescriptorForAlias(alias);
transporter.setObject(descriptor);
} catch (RuntimeException exception) {
transporter.setException(exception);
}
return transporter;
}

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

/**
* Extract descriptor from the session
*/
public Transporter getDescriptorForAlias(Transporter remoteTransporter) {
String alias = (String)remoteTransporter.getObject();
Transporter transporter = new Transporter();
try {
ClassDescriptor descriptor = getSession().getDescriptorForAlias(alias);
transporter.setObject(descriptor);
} catch (RuntimeException exception) {
transporter.setException(exception);
}
return transporter;
}

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

/**
* Answer true if this node refers to an object described later in the EJBQL
* True: SELECT p FROM Project p
* False: SELECT p.id FROM Project p
*/
public boolean nodeRefersToObject(Node node, GenerationContext context) {
if (!node.isVariableNode()){
return false;
}
String name = ((VariableNode)node).getCanonicalVariableName();
String alias = context.getParseTreeContext().schemaForVariable(name);
if (alias != null){
ClassDescriptor descriptor = context.getSession().getDescriptorForAlias(alias);
if (descriptor != null){
return true;
}
}
return false;
}

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

/**
* INTERNAL
* Answer the class associated with the provided schema name
*/
public Class classForSchemaName(String schemaName, GenerationContext context) {
ClassDescriptor descriptor = context.getSession().getDescriptorForAlias(schemaName);
if (descriptor == null) {
throw JPQLException.entityTypeNotFound(getQueryInfo(), schemaName);
}
Class theClass = descriptor.getJavaClass();
if (theClass == null) {
throw JPQLException.resolutionClassNotFoundException(getQueryInfo(), schemaName);
}
return theClass;
}

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

/**
* Answer true if this node refers to an object described later in the EJBQL
* True: SELECT p FROM Project p
* False: SELECT p.id FROM Project p
*/
public boolean nodeRefersToObject(Node node, GenerationContext context) {
if (!node.isVariableNode()){
return false;
}
String name = ((VariableNode)node).getCanonicalVariableName();
String alias = context.getParseTreeContext().schemaForVariable(name);
if (alias != null){
ClassDescriptor descriptor = context.getSession().getDescriptorForAlias(alias);
if (descriptor != null){
return true;
}
}
return false;
}

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

/**
* Answer true if this node refers to an object described later in the EJBQL
* True: SELECT p FROM Project p
* False: SELECT p.id FROM Project p
*/
public boolean nodeRefersToObject(Node node, GenerationContext context) {
if (!node.isVariableNode()){
return false;
}
String name = ((VariableNode)node).getCanonicalVariableName();
String alias = context.getParseTreeContext().schemaForVariable(name);
if (alias != null){
ClassDescriptor descriptor = context.getSession().getDescriptorForAlias(alias);
if (descriptor != null){
return true;
}
}
return false;
}

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

/**
* INTERNAL
* Answer the class associated with the provided schema name
*/
public Class classForSchemaName(String schemaName, GenerationContext context) {
ClassDescriptor descriptor = context.getSession().getDescriptorForAlias(schemaName);
if (descriptor == null) {
throw JPQLException.entityTypeNotFound(getQueryInfo(), schemaName);
}
Class theClass = descriptor.getJavaClass();
if (theClass == null) {
throw JPQLException.resolutionClassNotFoundException(getQueryInfo(), schemaName);
}
return theClass;
}

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

/**
* INTERNAL
* Answer the class associated with the provided schema name
*/
public Class classForSchemaName(String schemaName, GenerationContext context) {
ClassDescriptor descriptor = context.getSession().getDescriptorForAlias(schemaName);
if (descriptor == null) {
throw JPQLException.entityTypeNotFound(getQueryInfo(), schemaName);
}
Class theClass = descriptor.getJavaClass();
if (theClass == null) {
throw JPQLException.resolutionClassNotFoundException(getQueryInfo(), schemaName);
}
return theClass;
}

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

/**
* Find by primary key.
*
* @param entityClass
* - the entity class to find.
* @param primaryKey
* - the entity primary key value, or primary key class, or a
* List of primary key values.
* @return the found entity instance or null, if the entity does not exist.
* @throws IllegalArgumentException
* if the first argument does not indicate an entity or if the
* second argument is not a valid type for that entity's
* primaryKey.
*/
public Object find(String entityName, Object primaryKey) {
try {
verifyOpen();
AbstractSession session = (AbstractSession) getActiveSession();
ClassDescriptor descriptor = session.getDescriptorForAlias(entityName);
if (descriptor == null || descriptor.isDescriptorTypeAggregate()) {
throw new IllegalArgumentException(ExceptionLocalization.buildMessage("unknown_entitybean_name", new Object[] { entityName }));
}
return findInternal(descriptor, session, primaryKey, null, null);
} catch (LockTimeoutException e) {
throw e;
} catch (RuntimeException e) {
setRollbackOnly();
throw e;
}
}

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

/**
* resolveClass: Answer the class which corresponds to my variableName. This is the class for
* an alias, where the variableName is registered to an alias.
*/
public Class resolveClass(GenerationContext context) {
String alias = abstractSchemaName;
ClassDescriptor descriptor = context.getSession().getDescriptorForAlias(alias);
if (descriptor == null) {
throw JPQLException.entityTypeNotFound2(
context.getParseTreeContext().getQueryInfo(),
getLine(), getColumn(), alias);
}
Class theClass = descriptor.getJavaClass();
if (theClass == null) {
throw JPQLException.resolutionClassNotFoundException2(
context.getParseTreeContext().getQueryInfo(),
getLine(), getColumn(), alias);
}
return theClass;
}
}

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

/**
* resolveClass: Answer the class which corresponds to my variableName. This is the class for
* an alias, where the variableName is registered to an alias.
*/
public Class resolveClass(GenerationContext context) {
String alias = abstractSchemaName;
ClassDescriptor descriptor = context.getSession().getDescriptorForAlias(alias);
if (descriptor == null) {
throw JPQLException.entityTypeNotFound2(
context.getParseTreeContext().getQueryInfo(),
getLine(), getColumn(), alias);
}
Class theClass = descriptor.getJavaClass();
if (theClass == null) {
throw JPQLException.resolutionClassNotFoundException2(
context.getParseTreeContext().getQueryInfo(),
getLine(), getColumn(), alias);
}
return theClass;
}
}

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

/**
* resolveClass: Answer the class which corresponds to my variableName. This is the class for
* an alias, where the variableName is registered to an alias.
*/
public Class resolveClass(GenerationContext context) {
String alias = abstractSchemaName;
ClassDescriptor descriptor = context.getSession().getDescriptorForAlias(alias);
if (descriptor == null) {
throw JPQLException.entityTypeNotFound2(
context.getParseTreeContext().getQueryInfo(),
getLine(), getColumn(), alias);
}
Class theClass = descriptor.getJavaClass();
if (theClass == null) {
throw JPQLException.resolutionClassNotFoundException2(
context.getParseTreeContext().getQueryInfo(),
getLine(), getColumn(), alias);
}
return theClass;
}
}

推荐阅读
  • Spring源码解密之默认标签的解析方式分析
    本文分析了Spring源码解密中默认标签的解析方式。通过对命名空间的判断,区分默认命名空间和自定义命名空间,并采用不同的解析方式。其中,bean标签的解析最为复杂和重要。 ... [详细]
  • 本文介绍了多因子选股模型在实际中的构建步骤,包括风险源分析、因子筛选和体系构建,并进行了模拟实证回测。在风险源分析中,从宏观、行业、公司和特殊因素四个角度分析了影响资产价格的因素。具体包括宏观经济运行和宏经济政策对证券市场的影响,以及行业类型、行业生命周期和行业政策对股票价格的影响。 ... [详细]
  • SpringBoot整合SpringSecurity+JWT实现单点登录
    SpringBoot整合SpringSecurity+JWT实现单点登录,Go语言社区,Golang程序员人脉社 ... [详细]
  • 概述H.323是由ITU制定的通信控制协议,用于在分组交换网中提供多媒体业务。呼叫控制是其中的重要组成部分,它可用来建立点到点的媒体会话和多点间媒体会议 ... [详细]
  • 本文整理了Java中org.apache.pig.backend.executionengine.ExecException.<init>()方法的一些代码 ... [详细]
  • 微软头条实习生分享深度学习自学指南
    本文介绍了一位微软头条实习生自学深度学习的经验分享,包括学习资源推荐、重要基础知识的学习要点等。作者强调了学好Python和数学基础的重要性,并提供了一些建议。 ... [详细]
  • 本文介绍了设计师伊振华受邀参与沈阳市智慧城市运行管理中心项目的整体设计,并以数字赋能和创新驱动高质量发展的理念,建设了集成、智慧、高效的一体化城市综合管理平台,促进了城市的数字化转型。该中心被称为当代城市的智能心脏,为沈阳市的智慧城市建设做出了重要贡献。 ... [详细]
  • Spring特性实现接口多类的动态调用详解
    本文详细介绍了如何使用Spring特性实现接口多类的动态调用。通过对Spring IoC容器的基础类BeanFactory和ApplicationContext的介绍,以及getBeansOfType方法的应用,解决了在实际工作中遇到的接口及多个实现类的问题。同时,文章还提到了SPI使用的不便之处,并介绍了借助ApplicationContext实现需求的方法。阅读本文,你将了解到Spring特性的实现原理和实际应用方式。 ... [详细]
  • 关于我们EMQ是一家全球领先的开源物联网基础设施软件供应商,服务新产业周期的IoT&5G、边缘计算与云计算市场,交付全球领先的开源物联网消息服务器和流处理数据 ... [详细]
  • sklearn数据集库中的常用数据集类型介绍
    本文介绍了sklearn数据集库中常用的数据集类型,包括玩具数据集和样本生成器。其中详细介绍了波士顿房价数据集,包含了波士顿506处房屋的13种不同特征以及房屋价格,适用于回归任务。 ... [详细]
  • CF:3D City Model(小思维)问题解析和代码实现
    本文通过解析CF:3D City Model问题,介绍了问题的背景和要求,并给出了相应的代码实现。该问题涉及到在一个矩形的网格上建造城市的情景,每个网格单元可以作为建筑的基础,建筑由多个立方体叠加而成。文章详细讲解了问题的解决思路,并给出了相应的代码实现供读者参考。 ... [详细]
  • 标题: ... [详细]
  • 本文介绍了使用Spark实现低配版高斯朴素贝叶斯模型的原因和原理。随着数据量的增大,单机上运行高斯朴素贝叶斯模型会变得很慢,因此考虑使用Spark来加速运行。然而,Spark的MLlib并没有实现高斯朴素贝叶斯模型,因此需要自己动手实现。文章还介绍了朴素贝叶斯的原理和公式,并对具有多个特征和类别的模型进行了讨论。最后,作者总结了实现低配版高斯朴素贝叶斯模型的步骤。 ... [详细]
  • Java如何导入和导出Excel文件的方法和步骤详解
    本文详细介绍了在SpringBoot中使用Java导入和导出Excel文件的方法和步骤,包括添加操作Excel的依赖、自定义注解等。文章还提供了示例代码,并将代码上传至GitHub供访问。 ... [详细]
  • Spring框架《一》简介
    Spring框架《一》1.Spring概述1.1简介1.2Spring模板二、IOC容器和Bean1.IOC和DI简介2.三种通过类型获取bean3.给bean的属性赋值3.1依赖 ... [详细]
author-avatar
guanchunlei
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有