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

推荐阅读
  • 深入解析 Apache Shiro 安全框架架构
    本文详细介绍了 Apache Shiro,一个强大且灵活的开源安全框架。Shiro 专注于简化身份验证、授权、会话管理和加密等复杂的安全操作,使开发者能够更轻松地保护应用程序。其核心目标是提供易于使用和理解的API,同时确保高度的安全性和灵活性。 ... [详细]
  • 本文详细介绍了Java中org.w3c.dom.Text类的splitText()方法,通过多个代码示例展示了其实际应用。该方法用于将文本节点在指定位置拆分为两个节点,并保持在文档树中。 ... [详细]
  • 深入解析 Spring Security 用户认证机制
    本文将详细介绍 Spring Security 中用户登录认证的核心流程,重点分析 AbstractAuthenticationProcessingFilter 和 AuthenticationManager 的工作原理。通过理解这些组件的实现,读者可以更好地掌握 Spring Security 的认证机制。 ... [详细]
  • 深入解析Spring启动过程
    本文详细介绍了Spring框架的启动流程,帮助开发者理解其内部机制。通过具体示例和代码片段,解释了Bean定义、工厂类、读取器以及条件评估等关键概念,使读者能够更全面地掌握Spring的初始化过程。 ... [详细]
  • 本文将介绍如何编写一些有趣的VBScript脚本,这些脚本可以在朋友之间进行无害的恶作剧。通过简单的代码示例,帮助您了解VBScript的基本语法和功能。 ... [详细]
  • Explore how Matterverse is redefining the metaverse experience, creating immersive and meaningful virtual environments that foster genuine connections and economic opportunities. ... [详细]
  • Explore a common issue encountered when implementing an OAuth 1.0a API, specifically the inability to encode null objects and how to resolve it. ... [详细]
  • 本文详细介绍了如何在Linux系统上安装和配置Smokeping,以实现对网络链路质量的实时监控。通过详细的步骤和必要的依赖包安装,确保用户能够顺利完成部署并优化其网络性能监控。 ... [详细]
  • 1.如何在运行状态查看源代码?查看函数的源代码,我们通常会使用IDE来完成。比如在PyCharm中,你可以Ctrl+鼠标点击进入函数的源代码。那如果没有IDE呢?当我们想使用一个函 ... [详细]
  • CentOS7源码编译安装MySQL5.6
    2019独角兽企业重金招聘Python工程师标准一、先在cmake官网下个最新的cmake源码包cmake官网:https:www.cmake.org如此时最新 ... [详细]
  • 深入理解 SQL 视图、存储过程与事务
    本文详细介绍了SQL中的视图、存储过程和事务的概念及应用。视图为用户提供了一种灵活的数据查询方式,存储过程则封装了复杂的SQL逻辑,而事务确保了数据库操作的完整性和一致性。 ... [详细]
  • MQTT技术周报:硬件连接与协议解析
    本周开发笔记重点介绍了在新项目中使用MQTT协议进行硬件连接的技术细节,涵盖其特性、原理及实现步骤。 ... [详细]
  • 本文详细分析了Hive在启动过程中遇到的权限拒绝错误,并提供了多种解决方案,包括调整文件权限、用户组设置以及环境变量配置等。 ... [详细]
  • CentOS 6.8 上安装 Oracle 10.2.0.1 的常见问题及解决方案
    本文记录了在 CentOS 6.8 系统上安装 Oracle 10.2.0.1 数据库时遇到的问题及解决方法,包括依赖库缺失、操作系统版本不兼容、用户权限不足等问题。 ... [详细]
  • 本文详细探讨了在微服务架构中,使用Feign进行远程调用时出现的请求头丢失问题,并提供了具体的解决方案。重点讨论了单线程和异步调用两种场景下的处理方法。 ... [详细]
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社区 版权所有