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

  • SEARCH
  • Home
  • 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 3968862
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T03:53:39+00:00 2026-05-20T03:53:39+00:00

I have hibernate @Entity called Video with fields: @Column(name=TC_IN) private BigDecimal tcIn; @Column(name=TC_OUT) private

  • 0

I have hibernate @Entity called Video with fields:

@Column(name="TC_IN")
private BigDecimal tcIn;

@Column(name="TC_OUT")
private BigDecimal tcOut;

In the application, I need to convert the value to another format in order to use it.

So I added field:

@transient
private String formatTCOut;

public String getFormatTCOut(){
    if (formatTCOut==null){
       sysParamService = FacesContextUtils.getWebApplicationContext(FacesContext.getCurrentInstance()).getBean("SysParamService");
       formatTCOut =  tcOut * sysParamService.findParamByName("accuracy");
    }
   return formatTCOut 
}

Is it the right to invoke another service within entity of Hibernate?\

I have @Transactional( readOnly = true, propagation = Propagation.SUPPORTS ) above findParamByName of the service?

  • 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-05-20T03:53:40+00:00Added an answer on May 20, 2026 at 3:53 am

    In my opinion this is not a good design as it means your Hibernate object can now never be used outside of a web/JSF context.

    This reduces the re-usability of the code and makes it hard to unit test.

    Combining data/values from multiple beans or sources should be done at a higher level.

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

Sidebar

Related Questions

I have an entity defined as follows @Entity(name = Report) @Table(name = REPORTS) @org.hibernate.annotations.Entity(dynamicInsert
I have a Hibernate class called Expression (simplified here for your viewing pleasure): @Entity
Lets say in an application you have an entity called User. Each User can
I have table /entity called SaleRecord with fields such as @Entity public class SaleRecord
I am using Hibernate with spring. I have a model-class like this. @Entity @Table(name
In my GWT 2.4.0 application I use RequestFactory and Hibernate/JPA. I have an entity
I'm using Hibernate/JPA and have an @Entity object called Order, pointing at a MySQL
I have a Hibernate entity called IssueParticipant. It basically describes the relationship between a
I'm working with Hibernate and JPA. I have an entity called Customer that references
Let's say I have this entity (for Hibernate): @Entity public class Person { @Id

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.