// Path: src/main/java/org/esupportail/papercut/domain/PayPapercutTransactionLog.java
// @Entity
// @FilterDef(name = "contextFilter", parameters = {@ParamDef(name = "papercutContext", type = "string")})
// @Filter(name = "contextFilter", condition = "papercut_context = :papercutContext")
// public class PayPapercutTransactionLog implements ContextSupport {
// 
//     public static enum PayMode {
// 		IZLYPAY, PAYBOX
// 	}
//     
//     @Id
//     @GeneratedValue(strategy = GenerationType.AUTO)
//     @Column(name = "id")
//     private Long id;
//     
//     @Temporal(TemporalType.TIMESTAMP)
//     @DateTimeFormat(style = "dd/MM/yyyy-HH:mm:ss")
//     private Date transactionDate;
//     
//     @Enumerated(EnumType.STRING)
//     private PayMode payMode;
// 
//     private String uid;
// 
//     private String papercutContext;
// 
//     private String reference;
// 
//     private Integer montant;
// 
//     private String papercutNewSolde;
// 
//     private String idtrans;
// 
//     private String papercutOldSolde;
//     
//     private Boolean archived = false;   
//     
//     public Long getId() {
// 		return id;
// 	}
// 
// 	public void setId(Long id) {
// 		this.id = id;
// 	}
// 
// 	public Date getTransactionDate() {
// 		return transactionDate;
// 	}
// 
// 	public void setTransactionDate(Date transactionDate) {
// 		this.transactionDate = transactionDate;
// 	}
// 
// 	public String getUid() {
// 		return uid;
// 	}
// 
// 	public void setUid(String uid) {
// 		this.uid = uid;
// 	}
// 
// 	public String getPapercutContext() {
// 		return papercutContext;
// 	}
// 
// 	public void setPapercutContext(String papercutContext) {
// 		this.papercutContext = papercutContext;
// 	}
// 
// 	public PayMode getPayMode() {
// 		return payMode;
// 	}
// 
// 	public void setPayMode(PayMode payMode) {
// 		this.payMode = payMode;
// 	}
// 
// 	public String getReference() {
// 		return reference;
// 	}
// 
// 	public void setReference(String reference) {
// 		this.reference = reference;
// 	}
// 
// 	public Integer getMontant() {
// 		return montant;
// 	}
// 
// 	public void setMontant(Integer montant) {
// 		this.montant = montant;
// 	}
// 
// 	public String getPapercutNewSolde() {
// 		return papercutNewSolde;
// 	}
// 
// 	public void setPapercutNewSolde(String papercutNewSolde) {
// 		this.papercutNewSolde = papercutNewSolde;
// 	}
// 
// 	public String getIdtrans() {
// 		return idtrans;
// 	}
// 
// 	public void setIdtrans(String idtrans) {
// 		this.idtrans = idtrans;
// 	}
// 
// 	public String getPapercutOldSolde() {
// 		return papercutOldSolde;
// 	}
// 
// 	public void setPapercutOldSolde(String papercutOldSolde) {
// 		this.papercutOldSolde = papercutOldSolde;
// 	}
// 
// 	public Boolean getArchived() {
// 		return archived;
// 	}
// 
// 	public void setArchived(Boolean archived) {
// 		this.archived = archived;
// 	}
// 
// 	public String getMontantDevise() {
//     	Double mnt = new Double(montant)/100.0;
//     	return mnt.toString();
//     }
// 
// }
// 
// Path: src/main/java/org/esupportail/papercut/domain/PayPapercutTransactionLog.java
//    public static enum PayMode {
// 	IZLYPAY, PAYBOX
// }


import org.esupportail.papercut.domain.PayPapercutTransactionLog;
import org.esupportail.papercut.domain.PayPapercutTransactionLog.PayMode;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import java.util.Date;
import java.util.List;
/**
 * Licensed to EsupPortail under one or more contributor license
 * agreements. See the NOTICE file distributed with this work for
 * additional information regarding copyright ownership.
 *
 * EsupPortail licenses this file to you under the Apache License,
 * Version 2.0 (the "License"); you may not use this file except in
 * compliance with the License. You may obtain a copy of the License at:
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.esupportail.papercut.dao;



@Repository
public interface PayPapercutTransactionLogRepository extends JpaRepository<PayPapercutTransactionLog, Long>{

	Long countByUidAndArchived(String uid, Boolean archived);

	List<PayPapercutTransactionLog> findAllByTransactionDateBeforeAndUidIsNotLike(Date oldDate, String uid);

// Path: src/main/java/org/esupportail/papercut/domain/PayPapercutTransactionLog.java
// @Entity
// @FilterDef(name = "contextFilter", parameters = {@ParamDef(name = "papercutContext", type = "string")})
// @Filter(name = "contextFilter", condition = "papercut_context = :papercutContext")
// public class PayPapercutTransactionLog implements ContextSupport {
// 
//     public static enum PayMode {
// 		IZLYPAY, PAYBOX
// 	}
//     
//     @Id
//     @GeneratedValue(strategy = GenerationType.AUTO)
//     @Column(name = "id")
//     private Long id;
//     
//     @Temporal(TemporalType.TIMESTAMP)
//     @DateTimeFormat(style = "dd/MM/yyyy-HH:mm:ss")
//     private Date transactionDate;
//     
//     @Enumerated(EnumType.STRING)
//     private PayMode payMode;
// 
//     private String uid;
// 
//     private String papercutContext;
// 
//     private String reference;
// 
//     private Integer montant;
// 
//     private String papercutNewSolde;
// 
//     private String idtrans;
// 
//     private String papercutOldSolde;
//     
//     private Boolean archived = false;   
//     
//     public Long getId() {
// 		return id;
// 	}
// 
// 	public void setId(Long id) {
// 		this.id = id;
// 	}
// 
// 	public Date getTransactionDate() {
// 		return transactionDate;
// 	}
// 
// 	public void setTransactionDate(Date transactionDate) {
// 		this.transactionDate = transactionDate;
// 	}
// 
// 	public String getUid() {
// 		return uid;
// 	}
// 
// 	public void setUid(String uid) {
// 		this.uid = uid;
// 	}
// 
// 	public String getPapercutContext() {
// 		return papercutContext;
// 	}
// 
// 	public void setPapercutContext(String papercutContext) {
// 		this.papercutContext = papercutContext;
// 	}
// 
// 	public PayMode getPayMode() {
// 		return payMode;
// 	}
// 
// 	public void setPayMode(PayMode payMode) {
// 		this.payMode = payMode;
// 	}
// 
// 	public String getReference() {
// 		return reference;
// 	}
// 
// 	public void setReference(String reference) {
// 		this.reference = reference;
// 	}
// 
// 	public Integer getMontant() {
// 		return montant;
// 	}
// 
// 	public void setMontant(Integer montant) {
// 		this.montant = montant;
// 	}
// 
// 	public String getPapercutNewSolde() {
// 		return papercutNewSolde;
// 	}
// 
// 	public void setPapercutNewSolde(String papercutNewSolde) {
// 		this.papercutNewSolde = papercutNewSolde;
// 	}
// 
// 	public String getIdtrans() {
// 		return idtrans;
// 	}
// 
// 	public void setIdtrans(String idtrans) {
// 		this.idtrans = idtrans;
// 	}
// 
// 	public String getPapercutOldSolde() {
// 		return papercutOldSolde;
// 	}
// 
// 	public void setPapercutOldSolde(String papercutOldSolde) {
// 		this.papercutOldSolde = papercutOldSolde;
// 	}
// 
// 	public Boolean getArchived() {
// 		return archived;
// 	}
// 
// 	public void setArchived(Boolean archived) {
// 		this.archived = archived;
// 	}
// 
// 	public String getMontantDevise() {
//     	Double mnt = new Double(montant)/100.0;
//     	return mnt.toString();
//     }
// 
// }
// 
// Path: src/main/java/org/esupportail/papercut/domain/PayPapercutTransactionLog.java
//    public static enum PayMode {
// 	IZLYPAY, PAYBOX
// }


// Path: src/main/java/org/esupportail/papercut/dao/PayPapercutTransactionLogRepository.java
import org.esupportail.papercut.domain.PayPapercutTransactionLog;
import org.esupportail.papercut.domain.PayPapercutTransactionLog.PayMode;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import java.util.Date;
import java.util.List;

/**
 * Licensed to EsupPortail under one or more contributor license
 * agreements. See the NOTICE file distributed with this work for
 * additional information regarding copyright ownership.
 *
 * EsupPortail licenses this file to you under the Apache License,
 * Version 2.0 (the "License"); you may not use this file except in
 * compliance with the License. You may obtain a copy of the License at:
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.esupportail.papercut.dao;



@Repository
public interface PayPapercutTransactionLogRepository extends JpaRepository<PayPapercutTransactionLog, Long>{

	Long countByUidAndArchived(String uid, Boolean archived);

	List<PayPapercutTransactionLog> findAllByTransactionDateBeforeAndUidIsNotLike(Date oldDate, String uid);

	Page<PayPapercutTransactionLog> findPayPapercutTransactionLogsByIdtransAndPayMode(String idTrans, PayMode payMode, Pageable pageable);