热门标签 | 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;
}
}

推荐阅读
  • 生成式对抗网络模型综述摘要生成式对抗网络模型(GAN)是基于深度学习的一种强大的生成模型,可以应用于计算机视觉、自然语言处理、半监督学习等重要领域。生成式对抗网络 ... [详细]
  • 向QTextEdit拖放文件的方法及实现步骤
    本文介绍了在使用QTextEdit时如何实现拖放文件的功能,包括相关的方法和实现步骤。通过重写dragEnterEvent和dropEvent函数,并结合QMimeData和QUrl等类,可以轻松实现向QTextEdit拖放文件的功能。详细的代码实现和说明可以参考本文提供的示例代码。 ... [详细]
  • Linux重启网络命令实例及关机和重启示例教程
    本文介绍了Linux系统中重启网络命令的实例,以及使用不同方式关机和重启系统的示例教程。包括使用图形界面和控制台访问系统的方法,以及使用shutdown命令进行系统关机和重启的句法和用法。 ... [详细]
  • 开发笔记:加密&json&StringIO模块&BytesIO模块
    篇首语:本文由编程笔记#小编为大家整理,主要介绍了加密&json&StringIO模块&BytesIO模块相关的知识,希望对你有一定的参考价值。一、加密加密 ... [详细]
  • 本文讨论了在Windows 8上安装gvim中插件时出现的错误加载问题。作者将EasyMotion插件放在了正确的位置,但加载时却出现了错误。作者提供了下载链接和之前放置插件的位置,并列出了出现的错误信息。 ... [详细]
  • CSS3选择器的使用方法详解,提高Web开发效率和精准度
    本文详细介绍了CSS3新增的选择器方法,包括属性选择器的使用。通过CSS3选择器,可以提高Web开发的效率和精准度,使得查找元素更加方便和快捷。同时,本文还对属性选择器的各种用法进行了详细解释,并给出了相应的代码示例。通过学习本文,读者可以更好地掌握CSS3选择器的使用方法,提升自己的Web开发能力。 ... [详细]
  • 本文介绍了Redis的基础数据结构string的应用场景,并以面试的形式进行问答讲解,帮助读者更好地理解和应用Redis。同时,描述了一位面试者的心理状态和面试官的行为。 ... [详细]
  • 本文详细介绍了Spring的JdbcTemplate的使用方法,包括执行存储过程、存储函数的call()方法,执行任何SQL语句的execute()方法,单个更新和批量更新的update()和batchUpdate()方法,以及单查和列表查询的query()和queryForXXX()方法。提供了经过测试的API供使用。 ... [详细]
  • Java学习笔记之面向对象编程(OOP)
    本文介绍了Java学习笔记中的面向对象编程(OOP)内容,包括OOP的三大特性(封装、继承、多态)和五大原则(单一职责原则、开放封闭原则、里式替换原则、依赖倒置原则)。通过学习OOP,可以提高代码复用性、拓展性和安全性。 ... [详细]
  • Oracle seg,V$TEMPSEG_USAGE与Oracle排序的关系及使用方法
    本文介绍了Oracle seg,V$TEMPSEG_USAGE与Oracle排序之间的关系,V$TEMPSEG_USAGE是V_$SORT_USAGE的同义词,通过查询dba_objects和dba_synonyms视图可以了解到它们的详细信息。同时,还探讨了V$TEMPSEG_USAGE的使用方法。 ... [详细]
  • 本文讨论了在openwrt-17.01版本中,mt7628设备上初始化启动时eth0的mac地址总是随机生成的问题。每次随机生成的eth0的mac地址都会写到/sys/class/net/eth0/address目录下,而openwrt-17.01原版的SDK会根据随机生成的eth0的mac地址再生成eth0.1、eth0.2等,生成后的mac地址会保存在/etc/config/network下。 ... [详细]
  • Imtryingtofigureoutawaytogeneratetorrentfilesfromabucket,usingtheAWSSDKforGo.我正 ... [详细]
  • Spring常用注解(绝对经典),全靠这份Java知识点PDF大全
    本文介绍了Spring常用注解和注入bean的注解,包括@Bean、@Autowired、@Inject等,同时提供了一个Java知识点PDF大全的资源链接。其中详细介绍了ColorFactoryBean的使用,以及@Autowired和@Inject的区别和用法。此外,还提到了@Required属性的配置和使用。 ... [详细]
  • Java程序设计第4周学习总结及注释应用的开发笔记
    本文由编程笔记#小编为大家整理,主要介绍了201521123087《Java程序设计》第4周学习总结相关的知识,包括注释的应用和使用类的注释与方法的注释进行注释的方法,并在Eclipse中查看。摘要内容大约为150字,提供了一定的参考价值。 ... [详细]
  • 基于Socket的多个客户端之间的聊天功能实现方法
    本文介绍了基于Socket的多个客户端之间实现聊天功能的方法,包括服务器端的实现和客户端的实现。服务器端通过每个用户的输出流向特定用户发送消息,而客户端通过输入流接收消息。同时,还介绍了相关的实体类和Socket的基本概念。 ... [详细]
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社区 版权所有