Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Spring getting voucherPin

Have Programming Question? Ask it here!
 
 
 


samuel
getting voucherPin
0 Answer(s)      a year and 2 months ago
Posted in : Spring


I am doin an online credit topup application..and i need a method to fetch and decrypt the voucherpin from Database..

this is my voucher repository Class.

public interface VoucherRepository extends JpaRepository<Voucher, Long>{
    @Query("from voucher v where v.category = :category and v.voucherType = :type and v.denomination = :denomination")
    public String getVoucherPinByCategoryTypeDeno(@Param("category") String category,@Param("voucherType") String type, @Param("denomination") double denomination);
}

this is the voucherService class

public interface VoucherService {

    public String getVoucherPinByCategoryTypeDeno(String category,String type,double denomination);

   //decrypts voucher before being sent.
    public String decryptVoucher();

public void listVoucherTypeImages( String url []);

} this is the implementation

public class VoucherServiceImpl implements VoucherService {

    private VoucherRepository voucherRepository;
    //gets the voucher by category,type and denomination
    @Override
    public String getVoucherPinByCategoryTypeDeno(String category, String type, double denomination) {

        return voucherRepository.getVoucherPinByCategoryTypeDeno(category, type, denomination);
    }

this is my voucherModel Class

@Entity
public class Voucher {

    //declaration of variables with their annotations to map attributes of a voucher
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "voucher_id")
    private Long voucherId;

    @Column(name = "category_id")
    @OneToOne(mappedBy = " Voucher ")
    private VoucherCategory voucherCategory;

    @Column(name = "serial_number")
    private String serialNumber;

    @Column(name = "pin")
    private String pin;

    @Column(name="voucher_type_id")
    @OneToOne
    private VoucherType voucherTypeId;

    @Column(name = "voucher_status_id")
    @OneToOne
    private VoucherStatus statusId;

    @Column(name = "denomination")
    private double denomination;

    @Column(name = "session_lock")
    private Integer sessionLock;

    @Column(name = "updated_by")
    private String updatedBy;

    @Column(name = "expiry_date")
    private String expiryDate;

    @Column(name = "last_modified")
    @Temporal(javax.persistence.TemporalType.DATE)
    private String dateModified;

    @Column(name = "date_entered")
    @Temporal(javax.persistence.TemporalType.DATE)
    private String dateEntered;

    public Long getVoucherId() {
        return voucherId;
    }

    public void setVoucherId(Long voucherId) {
        this.voucherId = voucherId;
    }

    public VoucherCategory getVoucherCategory() {
        return voucherCategory;
    }

    public void setVoucherCategory(VoucherCategory voucherCategory) {
        this.voucherCategory = voucherCategory;
    }

    public String getSerialNumber() {
        return serialNumber;
    }

    public void setSerialNumber(String serialNumber) {
        this.serialNumber = serialNumber;
    }

    public double getDenomination() {
        return denomination;
    }

    public void setDenomination(double denomination) {
        this.denomination = denomination;
    }

    public String getDateEntered() {
        return dateEntered;
    }

    public void setDateEntered(String dateEntered) {
        this.dateEntered = dateEntered;
    }

    public String getExpiryDate() {
        return expiryDate;
    }

    public void setExpiryDate(String expiryDate) {
        this.expiryDate = expiryDate;
    }

    public String getPin() {
        return pin;
    }

    public void setPin(String pin) {
        this.pin = pin;
    }

    public VoucherStatus getStatusId() {
        return statusId;
    }

    public void setStatusId(VoucherStatus statusId) {
        this.statusId = statusId;
    }

    public Integer getSessionLock() {
        return sessionLock;
    }

    public void setSessionLock(Integer sessionLock) {
        this.sessionLock = sessionLock;
    }

    public String getUpdatedBy() {
        return updatedBy;
    }

    public void setUpdatedBy(String updatedBy) {
        this.updatedBy = updatedBy;
    }

    public String getDateModified() {
        return dateModified;
    }

    public void setDateModified(String dateModified) {
        this.dateModified = dateModified;
    }
}

Advertisement
View Answers

Related Tutorials/Questions & Answers:
getting voucherPin
getting voucherPin  I am doin an online credit topup application..and i need a method to fetch and decrypt the voucherpin from Database.. this is my voucher repository Class. public interface VoucherRepository extends
Getting Exception
Getting Exception  How to get exception from commented code in java
Advertisements
getting variables
getting variables   how to get variables from servlet program to webservice program
getting the emplo
getting the emplo   I have one table "EMPLOYEEMASTER" contains 'emp id', 'employee name' for eg: emp id employee name... kumar i want the sql statement for getting like emp id
Getting NumberFormatException
Getting NumberFormatException  Thanks for the reply. Its works well, but whenever I'm using numeric value from 0010 to 0757 it is returning some garbage value. I dont have the idea what is going wrong. Please give me some idea
Getting NumberFormatException
Getting NumberFormatException  Hello Sir, I'm using Integer.parseInt(String str) function which returns a NumberFormatException(Unknown source). I also used Integer.parseInt(String str, int radix) but it also throws the exception
getting errors
getting errors  public class positive { public static void main(String[] args) { retainPositiveNumbers(a); } private static int n; private static int j; static int a[]={-1,2,3,4,-5}; static int
Getting an error :(
Getting an error :(  I implemented the same code as above.. But getting this error in console... Console Oct 5, 2012 10:18:14 AM org.apache.tomcat.util.digester.SetPropertiesRule begin WARNING: [SetPropertiesRule]{Server
Getting around in Agra
Getting around in Agra  Hi, I am looking for complete information on getting around in Agra? Thanks
GETTING ALERT MESSAGE
GETTING ALERT MESSAGE  how to get an alert message when radio button is selected instead of checkbox
getting html list in a array
getting html list in a array  hi i want to get html unordered list in a array using jsp
Getting mysql table in textbox
Getting mysql table in textbox  how to get mysql table values into textbox in java using ajax and servlets
getting html list in a array
getting html list in a array  hi i want to get html unordered list in a array using jsp
Getting an exception - JSP-Servlet
Getting an exception  Dear Sir , While sending a mail am getting an following exception javax.mail.MessagingException: 554 mail server permanently rejected message (#5. 3.0)so how to over come from this please help
getting files from VSS
getting files from VSS  I am not able to get the files from VSS.I am using following code. and just let me know is localpath attribute is for our local project path? I am getting the problem in this line failed
GETTING AN ALERT MESSAGE
GETTING AN ALERT MESSAGE  how to get an alert message, if i select radio button instead of checkbox(associated with 3 dropdown list
getting coords from an image.
getting coords from an image.  how to get coordinates dynamically(in run time) from an image?? pls help me
Getting the string in reverse
Getting the string in reverse  i am giving the string=" i am sachin".for this output is "sachin am i".please give me the code?   Hi Friend, Visit Here Thanks
Getting an exception - JSP-Servlet
Getting an exception  thanks sir for u r reply ,but i already added that jar file sir even though i m getting an exception sir please help me sir ... thanks in advance..  Hi Friend, You can do one thing, replace
Getting Error - Development process
Getting Error   Hi , i am getting error while executing this code. I just want to store date in to database. Dont mistake me for repeated questions. java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Number
problem getting password - JavaMail
problem getting password  hi i am trying to get password but igot following error Error sending mail:javax.mail.MessagingException: Could not connect to SMTP host: 192.168.10.14, port: 25;nested exception
about getting the hour time
about getting the hour time  if i want to say, if the hour shows before noon, display message "good morning" and if otherwise, display "good afternoon" and so on..and im using tag..the problem is i dont know the code for Good
Date not getting in proper format
Date not getting in proper format  import java.util.*; class Date { public static void main(String[]args) { Date d = new Date(100000000000L); System.out.print("1st date"+d.toString()); } } out put:- 1st date@3e25
Getting garbage value
Getting garbage value  Thanks for the reply. Its works well, but whenever I'm using numeric value from 0010 to 0757 it is returning some garbage value. I dont have the idea what is going wrong. Please give me some idea to solve
Getting Computer Date in java
Getting Computer Date in java  Hi , I want to get the PC Date and insert it to a DB, specifically MSSQL.. Everything in my scriptlet works but this.. String strDate = new Date(); I get this server error, "The type Date
Getting IP Address
Getting IP Address  Hi... i want to get the ip address of the current machine running my jsp program.... example: my ip is 172.16.11.247... from other system if i run my jsp program using my ip like 172.16.11.247/myfile.jsp i
Getting IP Address
Getting IP Address  Hi... i want to get the ip address of the current machine running my jsp program.... example: my ip is 172.16.11.247... from other system if i run my jsp program using my ip like 172.16.11.247/myfile.jsp i
Getting an exception - JSP-Servlet
Getting an exception  sir i used u r code for sending a mass email by reading an excel sheet,but i am getting a following error so please help me if any changes in code . thanks in advance.. java.io.IOException: Invalid
Getting an exception - JSP-Servlet
Getting an exception  sir i used u r code for sending a mass email by reading an excel sheet,but i am getting a following error so please help me if any changes in code . thanks in advance.. java.io.IOException: Invalid
getting random number in java
getting random number in java  getting random number in java Hi everyone, i am trying to get a random number in a particular range. for example random numbers between 1 to 100 in Java. Though i m new to Java, i have tried many
Nested Ajax--not getting output
Nested Ajax--not getting output  Hi everyone... I have two.jsp page from that , with the help of ajax i have called three.jsp. So, i have used DIV in my jsp pages . on button click,It gives me my desired answer. Same,in next
getting db in action class
getting db in action class  hi, Am usin struts in ma application... n i need to interact with the db .. so i used.. getDataSource(request) but it gives me an error.. java.lang.NoSuchMethodError: LoginAction.getDataSource(Ljavax
Getting Stated with JDBC
Getting Stated with JDBC In this Getting Started with JDBC tutorial, we will explain you how you can start working with the JDBC API to develop database... it. In this section on Getting stated with JDBC you learned the basics of JDBC
Not getting the logic - JSP-Servlet
Not getting the logic  there is one sub module in my project.In that it display the list of candidates in a grid table who are selected for the interview with inline edit and the field of the table contains one checkbox, e.g if 5
Getting an exception - JSP-Servlet
Getting an exception   sir i am Getting following exception when executing javax.servlet.ServletException: java.lang.NoClassDefFoundError: org/apache/poi/poifs/filesystem/POIFSFileSystem I have used ur code import
Getting an exception - JSP-Servlet
Getting an exception  Dear sir,while executing this code i am getting a following error ,i am sending my code also please help me sir... //following is a code int a = 0, b = 1, c = 2, d = 3, e = 4,f=0; //int a, b, c, d, e
I am getting this exception
I am getting this exception   Exception in thread "main" org.hibernate.exception.GenericJDBCException: Cannot open connection at org.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java
Getting garbage value
Getting garbage value  Thank You Sir for helping me out from the problem. Now I'm facing some problem with the value I'm passing to the textfield from the link gets some garbage value whenever I'm using some particular set
Getting garbage value
Getting garbage value  Thank You Sir for helping me out from the problem. Now I'm facing some problem with the value I'm passing to the textfield from the link gets some garbage value whenever I'm using some particular set
Getting the string in reverse
Getting the string in reverse  i am giving the string=" i am sachin".for this output is "sachin am i".please give me the code?   Hi Friend, Try the following code: import java.util.*; class ReverseWords{ public
Getting an exception - JSP-Servlet
Getting an exception  sir i m Getting an following exception while sending a mail with attachment value ofsession is javax.mail.Session@192d604 value of mimemessage is javax.mail.internet.MimeMessage@120b2da value
Getting error java.lang.ClassNotFoundException: com.mysql.jdbc.Driver.
Getting error java.lang.ClassNotFoundException: com.mysql.jdbc.Driver.  I am doing project in JSP with database WampServer and glassfish as server .when i done database connection then i get an error
Im not getting validations - Struts
Im not getting validations  I created one struts aplication im using DynaValidations I configured validation.xml and validation-rules.xml also in s-c.xml But Im unable to get validations This is my validation.xml file
Getting an exception - JSP-Servlet
Getting an exception  sir i changed to that ie InputStream myInput1 = new FileInputStream(fileName); HSSFWorkbook myWorkBook = new HSSFWorkbook(myInput1); but when i click on a browse button and attached a file
Getting image pixel values
Getting image pixel values  how to get image pixels values on mouse click   import java.awt.*; import java.awt.event.*; import java.awt.image.BufferedImage; import java.io.*; import javax.swing.*; public class
Getting A File's Mime Type In Java
Getting A File's Mime Type In Java  Getting A File's Mime Type In Java
page is not getting loaded when refreshing???
page is not getting loaded when refreshing???  I am loading an image.... It will get all details of image section from database. I am getting header section always but page is not getting loaded after the header section when I
Getting IP address of All the machines
Getting IP address of All the machines  Program how to fetch All the IP address on my domain(LAN) in java
Getting Started With Java
Getting Started With Java       JDK 6 Tutorial The latest news for the java programmers that the Sun MicroSystems has released the Java SE 6 on Monday December 11.  
getting result in table dynamically - Struts
getting result in table dynamically  How do i get result in tabular format dynamically using our own tags
 

 

 

DMCA.com