NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

/*
* Copyright 2008 (C) Centric Retail Solutions NV. All rights reserved.
*/

package com.rs.sw.fs.ebo.dao.jdbc;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

import org.springframework.jdbc.core.RowMapper;

import com.rs.sw.fs.ebo.dao.jdbc.AbstractEboJdbcDao;
import com.rs.sw.ebo.Ebo;
import com.rs.sw.ebo.EboArtIntangibles;
import com.rs.sw.ebo.EboArtIntangiblesIdentification;
import com.rs.sw.ebo.EboIdentification;
import com.rs.sw.fs.ebo.dao.EboArtIntangiblesDao;

import com.rs.sw.util.StringConverter;

/**
* Class Implements Data Access Object for the EboArtIntangibles
*
* @see com.rs.swebo.EboArticle
*
*/
public class EboArtIntangiblesJdbcDao extends AbstractEboJdbcDao implements EboArtIntangiblesDao {
private static final String txtSqlInsertArt = "INSERT "
+ "INTO artintangibles "
+ "(idtarticle, codIntangible, flgRestrictIntangibleTransaction, codInterfaceType, flgDonationOfDay, txtCarrierID, txtCarrierUser, lenPhoneNum, txtServiceType, flgManualEntry, flgMagneticStripe, flgISOFormat, lenAccountNum, numAccountOffset, flgScanBarcode, lenBarcode, flgValidateCheckDigit, flgValidateDueDate, codDueDateFormat, numDueDateLeadDays, numDueDateOffset, lenDueDate) "
+ "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";

private static final String txtSqlUpdateArt = "UPDATE artintangibles "
+ "SET codIntangible = ?, flgRestrictIntangibleTransaction = ?, codInterfaceType = ?, flgDonationOfDay = ?,"
+ "txtCarrierID = ?, txtCarrierUser= ?, lenPhoneNum = ?, txtServiceType = ?, flgManualEntry = ?, "
+ "flgMagneticStripe = ?, flgISOFormat = ?, lenAccountNum = ?, numAccountOffset= ?, flgScanBarcode = ?, lenBarcode=?, flgValidateCheckDigit=?, "
+ "flgValidateDueDate = ?, codDueDateFormat = ?, numDueDateLeadDays = ?, numDueDateOffset = ?, lenDueDate = ?, codinitialload = ? "
+ "WHERE idtarticle = ?";

private static final String txtSqlDeleteArt = "DELETE FROM artintangibles " + "WHERE idtarticle = ?";

private final String txtSqlSelectArtById = "SELECT * " + "FROM artintangibles " + "WHERE idtarticle = ?";

@Override
protected List<String> getTableNames() {
List<String> list = new ArrayList<String>();
list.add("ArtIntangibles");
return list;
}

/**
* @see com.rs.sw.fs.ebo.dao.EboDao
*
* @throws ClassCastException
* if the Ebo to be inserted is not a EboArtIntangibles
*/
@Override
public int insert(final Ebo ebo, Long initialLoadId) {
final EboArtIntangibles eboArtIntangibles = (EboArtIntangibles) ebo;

Object[] values = new Object[] { eboArtIntangibles.getIdentification().getIdtArticle(),
eboArtIntangibles.getCodIntangible(),
eboArtIntangibles.getFlgRestrictIntangibleTransaction(),
eboArtIntangibles.getCodInterfaceType(),
eboArtIntangibles.getFlgDonationOfDay(),
eboArtIntangibles.getTxtCarrierID(),
eboArtIntangibles.getTxtCarrierUser(),
eboArtIntangibles.getLenPhoneNum(),
eboArtIntangibles.getTxtServiceType(),
eboArtIntangibles.getFlgManualEntry(),
eboArtIntangibles.getFlgMagneticStripe(),
eboArtIntangibles.getFlgISOFormat(),
eboArtIntangibles.getLenAccountNum(),
eboArtIntangibles.getNumAccountOffset(),
eboArtIntangibles.getFlgScanBarcode(),
eboArtIntangibles.getLenBarcode(),
eboArtIntangibles.getFlgValidateDueDate(),
eboArtIntangibles.getFlgValidateCheckDigit(),
eboArtIntangibles.getCodDueDateFormat(),
eboArtIntangibles.getNumDueDateLeadDays(),
eboArtIntangibles.getNumDueDateOffset(),
eboArtIntangibles.getLenDueDate(),
initialLoadId};






int rowsInserted = getJdbcTemplate().update(txtSqlInsertArt, values);

return rowsInserted;
}

/**
* @see com.rs.sw.fs.ebo.dao.EboDao
*
* @throws ClassCastException
* if the Ebo to be updated is not a EboArticle
*/
@Override
public int update(final Ebo ebo, Long initialLoadId) {
final EboArtIntangibles eboArtIntangibles = (EboArtIntangibles) ebo;

EboArtIntangiblesIdentification eboArtIntangiblesId = eboArtIntangibles.getIdentification();

Object[] values = new Object[] {
eboArtIntangibles.getCodIntangible(),
eboArtIntangibles.getFlgRestrictIntangibleTransaction(),
eboArtIntangibles.getCodInterfaceType(),
eboArtIntangibles.getFlgDonationOfDay(),
eboArtIntangibles.getTxtCarrierID(),
eboArtIntangibles.getTxtCarrierUser(),
eboArtIntangibles.getLenPhoneNum(),
eboArtIntangibles.getTxtServiceType(),
eboArtIntangibles.getFlgManualEntry(),
eboArtIntangibles.getFlgMagneticStripe(),
eboArtIntangibles.getFlgISOFormat(),
eboArtIntangibles.getLenAccountNum(),
eboArtIntangibles.getNumAccountOffset(),
eboArtIntangibles.getFlgScanBarcode(),
eboArtIntangibles.getLenBarcode(),
eboArtIntangibles.getFlgValidateDueDate(),
eboArtIntangibles.getFlgValidateCheckDigit(),
eboArtIntangibles.getCodDueDateFormat(),
eboArtIntangibles.getNumDueDateLeadDays(),
eboArtIntangibles.getNumDueDateOffset(),
eboArtIntangibles.getLenDueDate(),
initialLoadId,
eboArtIntangibles.getIdentification().getIdtArticle()};

int rowsUpdated = getJdbcTemplate().update(txtSqlUpdateArt, values);

if (rowsUpdated == 0) {
return 0;
}
return rowsUpdated;
}



/**
* @see com.rs.sw.fs.ebo.dao.EboDao
*
* @throws ClassCastException
* if the Ebo Id to be deleted is not a EboArtIntangiblesIdentification
*/
@Override
public int deleteInternal(final EboIdentification eboId) {
final EboArtIntangiblesIdentification identification = (EboArtIntangiblesIdentification) eboId;

Object[] values = new Object[] { identification.getIdtArticle() };

int rowsDeleted = this.getJdbcTemplate().update(txtSqlDeleteArt, values);

return rowsDeleted;
}


/**
* @see com.rs.sw.fs.ebo.dao.EboDao
*
* @throws ClassCastException
* if the Ebo Id to be found is not a EboArticleIdentification
*/
@SuppressWarnings("unchecked")
@Override
public Ebo findById(final EboIdentification eboId) {
final EboArtIntangiblesIdentification identification = (EboArtIntangiblesIdentification) eboId;
if (identification == null || identification.getIdtArticle() == null) {
return null;
}
List<EboArtIntangibles> artintangibles = this.getJdbcTemplate().query(this.txtSqlSelectArtById,
new Object[] { identification.getIdtArticle() }, new RowMapper() {
@Override
public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
EboArtIntangibles eboArtIntangibles = new EboArtIntangibles();

EboArtIntangiblesIdentification identification = new EboArtIntangiblesIdentification();
eboArtIntangibles.setIdentification(identification);
identification.setIdtArticle(rs.getString("IdtArticle"));
eboArtIntangibles.setCodIntangible(rs.getInt("CodIntangible"));
eboArtIntangibles.setFlgRestrictIntangibleTransaction(rs.getBoolean("FlgRestrictIntangibleTransaction"));
eboArtIntangibles.setCodInterfaceType(rs.getInt("CodInterfaceType"));
eboArtIntangibles.setFlgDonationOfDay(rs.getBoolean("FlgDonationOfDay"));
eboArtIntangibles.setTxtCarrierID(rs.getString("TxtCarrierID"));
eboArtIntangibles.setTxtCarrierUser(rs.getString("TxtCarrierUser"));
eboArtIntangibles.setLenPhoneNum(rs.getInt("LenPhoneNum"));
eboArtIntangibles.setTxtServiceType(rs.getString("TxtServiceType"));
eboArtIntangibles.setFlgManualEntry(rs.getBoolean("FlgManualEntry"));
eboArtIntangibles.setFlgMagneticStripe(rs.getBoolean("FlgMagneticStripe"));
eboArtIntangibles.setFlgISOFormat(rs.getBoolean("FlgISOFormat"));
eboArtIntangibles.setLenAccountNum(rs.getInt("LenAccountNum"));
eboArtIntangibles.setNumAccountOffset(rs.getInt("NumAccountOffset"));
eboArtIntangibles.setFlgScanBarcode(rs.getBoolean("FlgScanBarcode"));
eboArtIntangibles.setLenBarcode(rs.getInt("LenBarcode"));
eboArtIntangibles.setFlgValidateCheckDigit(rs.getBoolean("FlgValidateCheckDigit"));
eboArtIntangibles.setFlgValidateDueDate(rs.getBoolean("FlgValidateDueDate"));
eboArtIntangibles.setCodDueDateFormat(rs.getInt("CodDueDateFormat"));
eboArtIntangibles.setNumDueDateLeadDays(rs.getInt("NumDueDateLeadDays"));
eboArtIntangibles.setNumDueDateOffset(rs.getInt("NumDueDateOffset"));
eboArtIntangibles.setLenDueDate(rs.getInt("LenDueDate"));
System.out.println(">>>>>>>>>"+eboArtIntangibles.getTxtCarrierID());
return eboArtIntangibles;
}
});

if (artintangibles == null || artintangibles.isEmpty()) {
return null;
}

EboArtIntangibles eboArtIntangibles = artintangibles.get(0);

return eboArtIntangibles;
}

}
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.