Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8567051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T17:47:43+00:00 2026-06-11T17:47:43+00:00

Background Datatable item : +———+———+——–+ | field | type | index | +———+———+——–+ |

  • 0

Background

Datatable item:

+---------+---------+--------+
|  field  |  type   | index  |
+---------+---------+--------+
| id_item | INT     | PK     |
| name    | VARCHAR | UNIQUE |
+---------+---------+--------+

ItemRepository.java:

public interface ItemRepository extends CustomRepository<Item, Integer> {
    public Item getByName(String name); // because of the unique index
}

CustomRepository.java:

@NoRepositoryBean
public interface CustomRepository<E, PK extends Serializable> extends PagingAndSortingRepository<E, PK>, JpaSpecificationExecutor<E> {
    // common methods
}

CustomRepositoryImpl.java:

public class CustomRepositoryImpl<E, PK extends Serializable> extends SimpleJpaRepository<E, PK> implements CustomRepository<E, PK> {
    // common methods implementations
}

Question

As you can see, there isn’t no implementation of the interface ItemRepository. Which means, the getByName method has just a signature and never get implemented at anywhere. But it works. How?

PS

For the skeptics, with Eclipse, when keeping Ctrl pressed and the mouse over the getByName signature, clicking on Open Implementation doesn’t open any JAVA file at all.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T17:47:44+00:00Added an answer on June 11, 2026 at 5:47 pm

    Spring uses AOP for repositories, and will intercept any getByX method where X matches a bean property. In your example, the Item bean, declares the name property, so Spring intercepts it for you.

    See Defining query methods in the Spring Data JPA manual.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Background: I have a jQuery Datatable with 53x columns. The first column is the
Background: I am attempting to copy a DataTable to a SQLite database. In comparison
Hi all I have a BAckground worker and a Datatable. I have a timer
I'd like to change the background color of rows based on a condition. <t:dataTable
BACKGROUND I'm writing a method that will (eventually) take as input a System.Data.DataTable and
Is it possible to have a DataColumn in a DataTable that contains int and
I have a h:datatable with check boxes: <div id=settingsHashMap style=width:750px; height:400px; position:absolute; background-color:r; top:20px;
Background: What I need to accomplish is to remove any records in a collection
Background: We're building an application that allows our customers to supply data in a
Background: I'm using the (fantastic) Vim plugin python-mode , which includes the pep8 linter.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.