Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
709e7d4
commit 686a519
Showing
24 changed files
with
2,338 additions
and
192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
hibernate-core/src/main/java/org/hibernate/internal/FilterJdbcParameter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* Hibernate, Relational Persistence for Idiomatic Java | ||
* | ||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. | ||
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. | ||
*/ | ||
package org.hibernate.internal; | ||
|
||
import org.hibernate.metamodel.mapping.JdbcMapping; | ||
import org.hibernate.sql.ast.tree.expression.JdbcParameter; | ||
import org.hibernate.sql.exec.internal.JdbcParameterImpl; | ||
import org.hibernate.sql.exec.spi.JdbcParameterBinder; | ||
import org.hibernate.sql.exec.spi.JdbcParameterBinding; | ||
|
||
/** | ||
* @author Nathan Xu | ||
*/ | ||
public class FilterJdbcParameter { | ||
private final JdbcParameter parameter; | ||
private final JdbcMapping jdbcMapping; | ||
private final Object jdbcParameterValue; | ||
|
||
public FilterJdbcParameter(JdbcMapping jdbcMapping, Object jdbcParameterValue) { | ||
this.parameter = new JdbcParameterImpl( jdbcMapping ); | ||
this.jdbcMapping = jdbcMapping; | ||
this.jdbcParameterValue = jdbcParameterValue; | ||
} | ||
|
||
public JdbcParameter getParameter() { | ||
return parameter; | ||
} | ||
|
||
public JdbcParameterBinder getBinder() { | ||
return parameter.getParameterBinder(); | ||
} | ||
|
||
public JdbcParameterBinding getBinding() { | ||
return new JdbcParameterBinding() { | ||
@Override | ||
public JdbcMapping getBindType() { | ||
return jdbcMapping; | ||
} | ||
|
||
@Override | ||
public Object getBindValue() { | ||
return jdbcParameterValue; | ||
} | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.