text
stringlengths
10
2.72M
package Concurrency;/** * Created by pc on 2018/2/25. */ import java.util.concurrent.TimeUnit; /** * describe: * * @author xxx * @date4 {YEAR}/02/25 */ public class WaxOn implements Runnable { private Car car; public WaxOn(Car c){car = c;} public void run() { try{ while(!Thread.interrupted()){ System.out.println("wax on"); TimeUnit.MILLISECONDS.sleep(200); car.waxed(); car.waitForBuffering(); } } catch (InterruptedException e) { System.out.println("Exit"); } } }
package codex.task; import codex.log.Level; import javax.swing.*; import javax.swing.border.CompoundBorder; import javax.swing.border.EmptyBorder; import javax.swing.border.LineBorder; import javax.swing.text.BadLocationException; import javax.swing.text.DefaultCaret; import javax.swing.text.Style; import javax.swing.text.StyleConstants; import javax.swing.text.html.HTMLDocument; import java.awt.*; import java.io.IOException; import java.text.MessageFormat; import java.util.HashMap; import java.util.Map; public class TaskOutput extends JPanel { private static final ThreadLocal<ITask> CONTEXT = new ThreadLocal<>(); private static final Map<ITask, TaskOutput> OUTPUT_MAP = new HashMap<>(); public static TaskOutput createOutput(ITask task) { if (!OUTPUT_MAP.containsKey(task)) { OUTPUT_MAP.put(task, new TaskOutput()); task.addListener(new ITaskListener() { @Override public void statusChanged(ITask task, Status prevStatus, Status nextStatus) { if (nextStatus.isFinal()) { OUTPUT_MAP.remove(task); } } }); } return OUTPUT_MAP.get(task); } public static void put(Level level, String message, Object... params) { ITask context = CONTEXT.get(); TaskOutput output = OUTPUT_MAP.get(context); if (output == null || !output.isShowing()) { return; } SwingUtilities.invokeLater(() -> { Style style = output.pane.getStyle(level.toString()); Color color = StyleConstants.getForeground(style); String hex = "#"+Integer.toHexString(color.getRGB()).substring(2); HTMLDocument doc = (HTMLDocument) output.pane.getStyledDocument(); try { doc.insertAfterEnd(doc.getCharacterElement( doc.getLength()), MessageFormat.format( "<span><font color=\"{0}\">{1}</font></span><br>", hex, MessageFormat.format( message.replaceAll(" ", "&nbsp;").replace("\r\n", "<br>"), params ) ) ); } catch (BadLocationException | IOException e) { // } }); } synchronized static void defineContext(ITask task) { CONTEXT.set(task); } synchronized static void clearContext() { CONTEXT.set(null); } private final JTextPane pane = new JTextPane() {{ setEditable(false); setPreferredSize(new Dimension(450, 150)); setContentType("text/html"); setFont(new Font(Font.MONOSPACED, Font.PLAIN, 12)); putClientProperty(JEditorPane.HONOR_DISPLAY_PROPERTIES, true); ((DefaultCaret) getCaret()).setUpdatePolicy(DefaultCaret.ALWAYS_UPDATE); }}; private TaskOutput() { super(new BorderLayout()); registerStyle(Level.Debug, Color.GRAY); registerStyle(Level.Info, Color.BLACK); registerStyle(Level.Warn, Color.decode("#AA3333")); registerStyle(Level.Error, Color.decode("#FF3333")); JScrollPane scrollPane = new JScrollPane(); scrollPane.setLayout(new ScrollPaneLayout()); scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); scrollPane.getViewport().add(pane); scrollPane.setBorder(new LineBorder(Color.LIGHT_GRAY, 1)); add(scrollPane, BorderLayout.CENTER); } private void registerStyle(Level level, Color color) { Style style = this.pane.addStyle(level.toString(), null); style.addAttribute("level", level); StyleConstants.setForeground(style, color); } }
package nakoradio.mybad.core; import lombok.Builder; import lombok.Getter; import lombok.NonNull; import lombok.experimental.SuperBuilder; @Getter @Builder public class Error { // TODO: Consider which are nullable @NonNull private final ErrorType type; private final String message; private final String messageCode; private final String description; private final String technicalDescription; }
package tw.com.iisi.main; import tw.com.iisi.service.XMLValidationDom_SAX; import java.io.File; import java.io.IOException; import java.util.Scanner; public class Main { public static void main(String[] args) throws IOException { XMLValidationDom_SAX XMLValDom = new XMLValidationDom_SAX(); //xsd檔案來源位置 String xsdsrc = ""; //xml檔案來源位置 String xmlsrc = ""; Scanner scanner = new Scanner(System.in); //XML內容大小限制 System.setProperty("jdk.xml.maxOccurLimit", "20000"); System.out.println("加入xsd路徑"); xsdsrc = scanner.next(); XMLValDom.setxsdPath(xsdsrc); System.out.println("輸入所要檢查xml路徑"); xmlsrc = scanner.next(); XMLValDom.validateXMLSchema(xmlsrc); } }
package state; /** * Interface to enable Initialising the game * */ public interface Initialisable { /** * Enum describing the types of tickets that are available in the game */ enum TicketType { Bus, Taxi, Underground, DoubleMove, SecretMove }; /** * Function to initialise the state of the Game given a number of detectives. * To check how to correctly initialise the game check the rules for 'Scotland Yard' * @param numberOfDetectives The number of detectives that will be playing * @return True if the game has been initialised properly, false if not */ public Boolean initialiseGame(Integer numberOfDetectives); }
package fr.umlv.square.orm; import javax.enterprise.context.ApplicationScoped; import io.quarkus.hibernate.orm.panache.PanacheRepository; /** * Class which represent database table, it use to get all tuple, or filtered tuples The table is * filled with LogEntity elements */ @ApplicationScoped public class LogTable implements PanacheRepository<LogEntity> { }
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.javagym.daos.product; import com.javagym.entities.Product; import java.util.List; /** * * @author me */ public interface ProductDao { Product findById(int id); void save(Product product); void deleteById(int id); List<Product> findAllProducts(); }
class PE1 { public static void main(String args[]) { int sum = 0; int multiplesOf1000 = multiples(1000) System.out.println("Fizz Buzz Sum up to 1000."); System.out.println("Answer is:" + multiplesOf1000); } private int multiples(int number) { int multiples = 0; for (int i = 0; i < number; i++) { if (i % 3 == 0 | i % 5 == 0) { multiples = multiples + i; } } } return multiples; }
// ********************************************************************** // This file was generated by a TAF parser! // TAF version 3.2.1.6 by WSRD Tencent. // Generated from `/data/jcetool/taf//upload/opalli/AppPITUInterface.jce' // ********************************************************************** package PituClientInterface; public final class stBanner extends com.qq.taf.jce.JceStruct { public long id = 0; public String picUrl = ""; public long timeFinish = 0; public int mode = 0; public String url = ""; public String language = ""; public stBanner() { } public stBanner(long id, String picUrl, long timeFinish, int mode, String url, String language) { this.id = id; this.picUrl = picUrl; this.timeFinish = timeFinish; this.mode = mode; this.url = url; this.language = language; } public void writeTo(com.qq.taf.jce.JceOutputStream _os) { _os.write(id, 0); _os.write(picUrl, 1); _os.write(timeFinish, 2); _os.write(mode, 3); _os.write(url, 4); if (null != language) { _os.write(language, 5); } } public void readFrom(com.qq.taf.jce.JceInputStream _is) { this.id = (long) _is.read(id, 0, true); this.picUrl = _is.readString(1, true); this.timeFinish = (long) _is.read(timeFinish, 2, true); this.mode = (int) _is.read(mode, 3, true); this.url = _is.readString(4, true); this.language = _is.readString(5, false); } }
package network.kekejl.com.threadpooldemo; import android.app.Activity; import android.os.SystemClock; import android.os.Bundle; import android.util.Log; public class MainActivity extends Activity { private static final String TAG = "线程池的模拟"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); for (int i = 0; i < 21; i++) { ThreadPoolManger.getmInstance().executor(new MyTaskThread(i)); } } class MyTaskThread implements Runnable { private int num; public MyTaskThread(int num) { //构造方法里面模拟等待的时间段 this.num = num; Log.e(TAG, "第" + num + "个线程等待执行"); } @Override public void run() { Log.e(TAG, "第" + num + "个线程开始执行"); SystemClock.sleep(2000); Log.e(TAG, "第" + num + "个线程执行完成"); } } }
package org.inftel.socialwind.client.web.mvp.view; import org.inftel.socialwind.client.web.mvp.presenter.PerfilPresenter; import org.inftel.socialwind.shared.domain.SurferProxy; import com.google.gwt.user.client.ui.IsWidget; public interface PerfilView extends IsWidget { void setPresenter(PerfilPresenter presenter); void setPerfil(SurferProxy surfero); }
package controller; import java.awt.Point; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.util.ArrayList; import java.util.Iterator; import javax.swing.JButton; import javax.swing.JComboBox; import model.DriverModel; import view.DriverWindow; import view.GraphView; import view.calibration.CalibrationScreen; import view.calibration.StandardCalibrationScreen; public class DriverController { private DriverModel model; private CalibrationScreen calibrationScreen; private DriverWindow view; private GraphView graphView; private JButton calibrateButton; private JButton enableButton; private JButton refreshButton; private JComboBox<String> portPicker; private boolean enabled; public DriverController() { view = new DriverWindow(); model = new DriverModel(); enabled = false; } public void init() { view.init(this); view.setVisible(true); this.refresh(); } public void registerPortPicker(JComboBox<String> portPicker) { this.portPicker = portPicker; this.portPicker.addItem("Select a Serial Port"); this.portPicker.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { DriverController.this.changePort(); } }); } public void registerRefreshButton(JButton refreshButton) { this.refreshButton = refreshButton; this.refreshButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { DriverController.this.refresh(); } }); } public void registerCalibrateButton(JButton calibrateButton) { this.calibrateButton = calibrateButton; this.calibrateButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { DriverController.this.calibrate(); } }); } public void registerEnableButton(JButton enableButton) { this.enableButton = enableButton; this.enableButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { DriverController.this.enable(); } }); } public void registerGraphView(GraphView graphView) { this.graphView = graphView; } protected void changePort() { String newPort = (String) this.portPicker.getSelectedItem(); if (newPort != null && newPort.equals("Select a Serial Port") == false) { this.model.setPort(newPort); this.enableButton.setEnabled(true); } else { this.enableButton.setEnabled(false); this.calibrateButton.setEnabled(false); } } protected void refresh() { String currentlySelected = (String) this.portPicker.getSelectedItem(); this.portPicker.removeAllItems(); this.portPicker.addItem("Select a Serial Port"); this.portPicker.setSelectedIndex(0); Iterator<String> availableSerialPorts = this.model.availableSerialPorts().iterator(); while (availableSerialPorts.hasNext()) { String port = availableSerialPorts.next(); this.portPicker.addItem(port); if (currentlySelected.equals(port)) { this.portPicker.setSelectedItem(port); } } } protected void calibrate() { // Check operating system, Mac needs a special step. String operatingSystem = System.getProperty("os.name").toLowerCase(); ClassLoader classLoader = ClassLoader.getSystemClassLoader(); if (operatingSystem.indexOf("mac") != -1) { try { Class<?> OSXCalibrationScreen = classLoader.loadClass("view.calibration.OSXCalibrationScreen"); this.calibrationScreen = (CalibrationScreen) OSXCalibrationScreen.newInstance(); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) { e.printStackTrace(); System.exit(0); } } else { this.calibrationScreen = new StandardCalibrationScreen(); } // Begin calibration with 4 points this.model.beginCalibration(4); this.calibrationScreen.addMouseListener(new MouseListener() { private ArrayList<Point> points = new ArrayList<Point>(); @Override public void mouseClicked(MouseEvent e) { } @Override public void mousePressed(MouseEvent e) { points.add(calibrationScreen.getTargetLocation()); calibrationScreen.nextTarget(); if (points.size() > 3) { calibrationScreen.setVisible(false); calibrationScreen.dispose(); DriverController.this.model.calibrate(points); DriverController.this.graphView.subscribe(DriverController.this.model.getPlatformReader()); } } @Override public void mouseReleased(MouseEvent e) { } @Override public void mouseEntered(MouseEvent e) { } @Override public void mouseExited(MouseEvent e) { } }); calibrationScreen.setVisible(true); } // Enable mouse control protected void enable() { if (enabled) { this.model.disableCursors(); enabled = false; this.enableButton.setText("Enable"); this.calibrateButton.setEnabled(false); this.portPicker.setEnabled(true); this.refreshButton.setEnabled(true); } else { this.model.setNumberOfCursors(1); if (this.model.enableCursors()) { this.enableButton.setText("Disable"); this.calibrateButton.setEnabled(true); this.portPicker.setEnabled(false); this.refreshButton.setEnabled(false); this.graphView.subscribe(this.model.getPlatformReader()); enabled = true; } } } }
/* * [y] hybris Platform * * Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. * * This software is the confidential and proprietary information of SAP * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with SAP. */ package com.hybris.backoffice.workflow; import static com.google.common.collect.Lists.newArrayList; import static org.fest.assertions.Assertions.assertThat; import static org.mockito.BDDMockito.given; import static org.mockito.Mockito.mock; import java.util.List; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.runners.MockitoJUnitRunner; import com.hybris.backoffice.widgets.networkchart.context.NetworkChartContext; import com.hybris.cockpitng.components.visjs.network.data.Network; import com.hybris.cockpitng.components.visjs.network.response.NetworkUpdates; @RunWith(MockitoJUnitRunner.class) public class WorkflowPopulatorTest { @Mock WorkflowNetworkFactory mockedWorkflowNetworkFactory; @Mock WorkflowItemExtractor mockedWorkflowItemExtractor; @InjectMocks WorkflowPopulator workflowPopulator; @Test public void shouldPopulateNetwork() { // given final List<WorkflowItem> items = newArrayList(mock(WorkflowItem.class), mock(WorkflowItem.class)); final NetworkChartContext mockedNetworkChartContext = mock(NetworkChartContext.class); given(mockedWorkflowItemExtractor.extract(mockedNetworkChartContext)).willReturn(items); final Network mockedNetwork = mock(Network.class); given(mockedWorkflowNetworkFactory.create(items)).willReturn(mockedNetwork); // when final Network result = workflowPopulator.populate(mockedNetworkChartContext); // then assertThat(result).isEqualTo(mockedNetwork); } @Test public void shouldNotHandleUpdates() { // given final Object anyUpdatedObject = mock(Object.class); final NetworkChartContext anyNetworkChartContext = mock(NetworkChartContext.class); // when final NetworkUpdates result = workflowPopulator.update(anyUpdatedObject, anyNetworkChartContext); // then assertThat(result).isSameAs(NetworkUpdates.EMPTY); } }
/* * Copyright 2008 University of California at Berkeley * * Licensed 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.rebioma.client; import java.util.ArrayList; import java.util.Date; import org.form.client.api.DisplayPopup; import org.rebioma.client.bean.User; import org.rebioma.client.i18n.AppConstants; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.core.client.GWT; import com.google.gwt.maps.client.LoadApi; import com.google.gwt.maps.client.LoadApi.LoadLibrary; import com.google.gwt.user.client.Cookies; import com.google.gwt.user.client.History; import com.google.gwt.user.client.Window; import com.google.gwt.user.client.rpc.AsyncCallback; import com.google.gwt.user.client.ui.HasHorizontalAlignment; import com.google.gwt.user.client.ui.HorizontalPanel; import com.google.gwt.user.client.ui.Image; import com.google.gwt.user.client.ui.Label; import com.google.gwt.user.client.ui.RootPanel; /** * The Portal class serves at the GWT {@link EntryPoint} to the application. It * manages the {@link Application} and also provides history support. */ public class Portal implements EntryPoint { /** * The application constants used for internationalization. */ private static final AppConstants constants = ApplicationView.getConstants(); /** * The application image bundle. */ private static final AppImages images = GWT.create(AppImages.class); /** * Static code that adds an uncaught exception handler. */ static { GWT.setUncaughtExceptionHandler(new GWT.UncaughtExceptionHandler() { public void onUncaughtException(Throwable e) { GWT.log(e.getMessage(), e); StringBuilder sp = new StringBuilder(); for (StackTraceElement stackTrace : e.getStackTrace()) { sp.append("file:" + stackTrace.getFileName() + " at " + stackTrace.getMethodName() + ":" + stackTrace.getLineNumber()); } Window.confirm("Unexpected error: " + e.getMessage() + "\n" + sp); e.printStackTrace(); } }); } // private final PrintView printView = new PrintView(); public static native String browserDetect() /*-{ var browser=navigator.appName; var b_version=navigator.appVersion; var version=parseFloat(b_version); return browser; }-*/; public void onModuleLoad() { // loadMapApi(); // Uncomment this to test new view stuff: DisplayPopup.setCloseImageUrl("images/xclose.gif"); Window.enableScrolling(false); HorizontalPanel hp = new HorizontalPanel(); hp.add(new Label(constants.LoadingUser())); hp.setWidth("100%"); hp.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); RootPanel.get().add(hp); checkCurrentSession(); // Window.confirm(browserDetect()); } private void loadMapApi() { boolean sensor = true; // load all the libs for use in the maps ArrayList<LoadLibrary> loadLibraries = new ArrayList<LoadApi.LoadLibrary>(); loadLibraries.add(LoadLibrary.ADSENSE); loadLibraries.add(LoadLibrary.DRAWING); loadLibraries.add(LoadLibrary.GEOMETRY); loadLibraries.add(LoadLibrary.PANORAMIO); loadLibraries.add(LoadLibrary.PLACES); loadLibraries.add(LoadLibrary.WEATHER); loadLibraries.add(LoadLibrary.VISUALIZATION); Runnable onLoad = new Runnable() { @Override public void run() { } }; LoadApi.go(onLoad, loadLibraries, sensor); } /** * Checks the current session via RPC. Updates application state. Updates all * tab widgets with new application state. */ private void checkCurrentSession() { final String dev = Window.Location.getParameter("gwt.codesvr")==null? "":"Portal.html?gwt.codesvr="+Window.Location.getParameter("gwt.codesvr"); String from = Window.Location.getParameter("from"); String sign = Window.Location.getParameter("signinc"); if(from != null){ String family = Window.Location.getParameter("family"); family = (family==null || family.isEmpty())?"":"&asearch=AcceptedFamily like " + family.trim(); String genus = Window.Location.getParameter("genus"); String m_search = genus==null?"":genus; genus = (genus==null || genus.isEmpty())?"":"&asearch=AcceptedGenus like " + genus.trim(); String species = Window.Location.getParameter("species"); m_search = (species==null||species.trim().isEmpty())?m_search:species; species = (species==null || species.isEmpty())?"":"&asearch=AcceptedSpecies like " + species.trim(); String year = Window.Location.getParameter("year"); year = (year==null || year.isEmpty())?"":"&asearch=YearCollected = " + year.trim(); Window.Location.replace( GWT.getHostPageBaseURL() + dev + "#tab=occ&view=Map&zoom=5&center=-19,47&map_type=terrain&left_tab=1&m_search=" + m_search + "&asearch=AcceptedOrder = PRIMATES&m_page=1&page=1" + family + genus + species + "&error_type=all&type=all occurrences" ); } else if(sign!=null){ String email = Window.Location.getParameter("emailc"); final String id = Window.Location.getParameter("id"); Cookies.removeCookie(ApplicationView.SESSION_ID_NAME); DataSwitch.get().signInC(email, sign, new AsyncCallback<User>() { @Override public void onFailure(Throwable caught) { // TODO Auto-generated method stub } @Override public void onSuccess(User result) { // TODO Auto-generated method stub if(result.getSessionId()==null)initApplication(null); else{ Cookies.setCookie(ApplicationView.SESSION_ID_NAME, result.getSessionId(),new Date(System .currentTimeMillis() + 86400000)); Window.Location.replace(GWT.getHostPageBaseURL()+dev+"#tab=occ&view=Detail&id="+id+"&p=false&page=1&asearch=Id = "+id+"&type=all occurrences"); } } }); }else if (!isSessionIdInBrowser()) { // links.showLinks(HOME_UNAUTHENTICATED_LINKS); initApplication(null); return; } else { String sid = Cookies.getCookie(ApplicationView.SESSION_ID_NAME); DataSwitch.get().isSessionIdValid(sid, new AsyncCallback<User>() { public void onFailure(Throwable caught) { GWT.log(caught.getMessage(), caught); initApplication(null); } public void onSuccess(User result) { if (result != null) { ApplicationView.setSessionId(result.getSessionId()); ApplicationView.refreshSession(); } initApplication(result); } }); } } private void initApplication(User user) { ApplicationView.setAuthenticatedUser(user); // Make sure the server is notify when the session is longer valid when // load. if (user == null) { ApplicationView.signOutOnServer(); } // ApplicationView.setCurrentState(user == null ? ViewState.UNAUTHENTICATED // : ViewState.RESEARCHER); Image logo = images.rebiomaLogoSmall().createImage(); logo.addStyleName("rebioma-logo"); ApplicationView appView = ApplicationView.getApplication(); appView.setTitleWidget(logo); appView.initSearchWidget(); History.addValueChangeHandler(appView); if (History.getToken().length() > 0) { History.fireCurrentHistoryState(); } else { appView.init(true); } RootPanel.get().clear(); RootPanel.get().add(appView); } /** * Returns true if there is a sessionId in the browser * * @return true if the browser contains a sessionId */ private boolean isSessionIdInBrowser() { String sessionId = Cookies.getCookie(ApplicationView.SESSION_ID_NAME); return sessionId != null && !sessionId.equals(""); } }
package Behavioral.Observer; /** * This pattern is used when we have a subject to observe by different observers. * * A subject has one to many observers * * It is often used in Problems as Event handling. * * Example: java.util.Observer, java.util.EventListener, java.jms.topic * * It's made of Subject, ConcreteSubject, Observer, ConcreteObserver */ public class ObserverPattern { public static void main(String[] args) { NewsSubject newsSubject = new NewsSubject(); PhoneClient phoneClient = new PhoneClient(newsSubject); TabletClient tabletClient = new TabletClient(newsSubject); newsSubject.addMessage("Added News. Let's see if it reaches or not"); newsSubject.addMessage("second message"); } }
package com.t.s.model.biz; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.t.s.model.dao.MoimUserDao; import com.t.s.model.dto.MoimUserDto; @Service public class MoimUserBizImpl implements MoimUserBiz { @Autowired private MoimUserDao dao; @Override public int survey(MoimUserDto dto) { return dao.survey(dto); } @Override public double avgQ1(MoimUserDto dto) { return dao.avgQ1(dto); } @Override public double avgQ2(MoimUserDto dto) { return dao.avgQ2(dto); } @Override public double avgQ3(MoimUserDto dto) { return dao.avgQ3(dto); } @Override public double avgQ4(MoimUserDto dto) { return dao.avgQ4(dto); } @Override public double avgQ5(MoimUserDto dto) { return dao.avgQ5(dto); } @Override public double avgAll(double avgQ1, double avgQ2, double avgQ3, double avgQ4, double avgQ5) { double sum = avgQ1+avgQ2+avgQ3+avgQ4+avgQ5; double res = Double.parseDouble(String.format("%.2f",sum/5)); return res; } @Override public int moimjoin(MoimUserDto dto) { // TODO Auto-generated method stub return dao.moimjoin(dto); } @Override public int moimout(MoimUserDto dto) { // TODO Auto-generated method stub return dao.moimout(dto); } @Override public MoimUserDto moimres(MoimUserDto dto) { // TODO Auto-generated method stub return dao.moimres(dto); } @Override public int findMoimNo(MoimUserDto moimuserdto) { // TODO Auto-generated method stub return dao.findMoimNo(moimuserdto); } }
import java.io.IOException; import java.io.PrintWriter; import java.sql.DriverManager; import java.sql.SQLException; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.sql.Connection; import java.sql.DriverManager; import java.sql.Statement; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util.List; import java.util.Set; @WebServlet("/PeopleDAO") public class PeopleDAO { private static final long serialVersionUID = 1L; private Connection connect = null; private Statement statement = null; private PreparedStatement preparedStatement = null; public PeopleDAO() {} /** * @see HttpServlet#HttpServlet() */ protected void connect_func() throws SQLException { if (connect == null || connect.isClosed()) { try { Class.forName("com.mysql.jdbc.Driver"); } catch (ClassNotFoundException e) { throw new SQLException(e); } connect = (Connection) DriverManager .getConnection("jdbc:mysql://127.0.0.1:3306/classproject?" + "useSSL=false&user=project&password=Project1234"); System.out.println(connect); } } public boolean addNewUser(User newUser) throws SQLException { connect_func(); String getAllUsers = "SELECT Username FROM user"; statement = (Statement) connect.createStatement(); ResultSet usernames = statement.executeQuery(getAllUsers); while(usernames.next()) { if(usernames.getString("Username").equals(newUser.username)) { usernames.close(); statement.close(); disconnect(); System.out.println("Username already exists"); return false; } } String insert = "INSERT INTO user(Username, Password, FirstName, LastName, Age) VALUES (?, ?, ?, ?, ?)"; preparedStatement = (PreparedStatement) connect.prepareStatement(insert); preparedStatement.setString(1, newUser.username); preparedStatement.setString(2, newUser.password); preparedStatement.setString(3, newUser.firstName); preparedStatement.setString(4, newUser.lastName); preparedStatement.setString(5, Integer.toString(newUser.age)); int rowInserted = preparedStatement.executeUpdate(); preparedStatement.close(); disconnect(); return rowInserted > 0; } public boolean checkLogin(User loginInfo) throws SQLException { connect_func(); String sql = "SELECT * FROM user WHERE Username='" + loginInfo.username + "'"; statement = (Statement) connect.createStatement(); ResultSet resultSet = statement.executeQuery(sql); if(!resultSet.next()) { return false; } String databasePassword = resultSet.getString("Password"); resultSet.close(); statement.close(); disconnect(); if(loginInfo.password.equals(databasePassword)) { return true; }else { return false; } } protected void disconnect() throws SQLException { if (connect != null && !connect.isClosed()) { connect.close(); } } public User getUserInfo(User loginInfo) throws SQLException { connect_func(); String sql = "SELECT * FROM user WHERE Username='" + loginInfo.username + "'"; statement = (Statement) connect.createStatement(); ResultSet resultSet = statement.executeQuery(sql); resultSet.next(); User userInfo; if(loginInfo.username.contentEquals("root")) { userInfo = new User(resultSet.getString("Username"), resultSet.getString("Password")); }else { userInfo = new User(resultSet.getString("Username"), resultSet.getString("Password"), resultSet.getString("FirstName"), resultSet.getString("LastName"), Integer.parseInt(resultSet.getString("Age"))); } resultSet.close(); statement.close(); disconnect(); return userInfo; } public void dropAllTables() throws SQLException{ connect_func(); String[] dropStatements = {"DROP TABLE isfavorite", "DROP TABLE youtubetags", "DROP TABLE reviews", "DROP TABLE youtubevideos", "DROP TABLE comedians", "DROP TABLE user"}; String[] createStatements = {"CREATE TABLE user (Username CHAR(50), Password CHAR(20), FirstName CHAR(50), LastName CHAR(50), Age INTEGER, PRIMARY KEY(Username))", "CREATE TABLE comedians (comid INTEGER, FirstName VARCHAR(50), LastName VARCHAR(50), Birthday DATE, BirthPlace VARCHAR(50), PRIMARY KEY(comid))", "CREATE TABLE youtubevideos (url VARCHAR(150), Title VARCHAR(50), VideoDescription VARCHAR(200), comid INTEGER, PostUser VARCHAR(50), PostDate DATE, PRIMARY KEY (url), FOREIGN KEY (comid) REFERENCES comedians(comid))", "CREATE TABLE reviews (reviewid INTEGER NOT NULL auto_increment, Remark VARCHAR(100), Rating CHAR(1), Author VARCHAR(50) NOT NULL, Youtubeid VARCHAR(150) NOT NULL, PRIMARY KEY (reviewid), FOREIGN KEY (Youtubeid) REFERENCES YoutubeVideos(url), CONSTRAINT RatingCheck CHECK (Rating IN ('P', 'F', 'G', 'E')))", "CREATE TABLE youtubetags (url VARCHAR(150), Tag VARCHAR(50), PRIMARY KEY(url, Tag))", "CREATE TABLE isfavorite (Username VARCHAR(50), comid INTEGER, PRIMARY KEY (Username, comid), FOREIGN KEY (comid) REFERENCES Comedians (comid))"}; String addRootUser = "INSERT INTO user(Username, Password) VALUES ('root','pass1234')"; String[] users = {"INSERT INTO user(Username, Password, FirstName, LastName, Age) VALUES ('user1', 'pass1', 'user1First', 'user1Last', 1)", "INSERT INTO user(Username, Password, FirstName, LastName, Age) VALUES ('user2', 'pass2', 'user2First', 'user2Last', 2)", "INSERT INTO user(Username, Password, FirstName, LastName, Age) VALUES ('user3', 'pass3', 'user3First', 'user3Last', 3)", "INSERT INTO user(Username, Password, FirstName, LastName, Age) VALUES ('user4', 'pass4', 'user4First', 'user4Last', 4)", "INSERT INTO user(Username, Password, FirstName, LastName, Age) VALUES ('user5', 'pass5', 'user5First', 'user5Last', 5)", "INSERT INTO user(Username, Password, FirstName, LastName, Age) VALUES ('user6', 'pass6', 'user6First', 'user6Last', 6)", "INSERT INTO user(Username, Password, FirstName, LastName, Age) VALUES ('user7', 'pass7', 'user7First', 'user7Last', 7)", "INSERT INTO user(Username, Password, FirstName, LastName, Age) VALUES ('user8', 'pass8', 'user8First', 'user8Last', 8)", "INSERT INTO user(Username, Password, FirstName, LastName, Age) VALUES ('user9', 'pass9', 'user9First', 'user9Last', 9)", "INSERT INTO user(Username, Password, FirstName, LastName, Age) VALUES ('user10', 'pass10', 'user10First', 'user10Last', 10)" }; String[] comedians = {"INSERT INTO comedians(comid, FirstName, LastName, Birthday, BirthPlace) VALUES (1, 'Dane', 'Cook', '1972-03-18', 'Cambridge, MA')", "INSERT INTO comedians(comid, FirstName, LastName, Birthday, BirthPlace) VALUES (2, 'Gabriel', 'Iglesias', '1976-07-15', 'San Diego, CA')", "INSERT INTO comedians(comid, FirstName, LastName, Birthday, BirthPlace) VALUES (3, 'Bill', 'Burr', '1968-06-10', 'Canton, MA')", "INSERT INTO comedians(comid, FirstName, LastName, Birthday, BirthPlace) VALUES (4, 'Chris', 'Rock', '1965-02-07', 'Andrews, SC')", "INSERT INTO comedians(comid, FirstName, LastName, Birthday, BirthPlace) VALUES (5, 'Sebastian', 'Maniscalco', '1973-07-08', 'Arlington Heights, IL')", "INSERT INTO comedians(comid, FirstName, LastName, Birthday, BirthPlace) VALUES (6, 'George', 'Lopez', '1961-04-23', 'Los Angeles, CA')", "INSERT INTO comedians(comid, FirstName, LastName, Birthday, BirthPlace) VALUES (7, 'Kevin', 'Hart', '1979-07-06', 'Philadelphia, PA')", "INSERT INTO comedians(comid, FirstName, LastName, Birthday, BirthPlace) VALUES (8, 'Dave', 'Chappelle', '1973-08-24', 'Washington, D.C.')" }; String[] videos = {"INSERT INTO youtubevideos(url, Title, VideoDescription, comid, PostUser, PostDate) VALUES ('https://www.youtube.com/watch?v=YDkOZaolWQE', 'Hot and Fluffy', 'Gabriel Iglesias is one of the fastest rising comics today!', 2, 'user1', '2020-06-26')", "INSERT INTO youtubevideos(url, Title, VideoDescription, comid, PostUser, PostDate) VALUES ('https://www.youtube.com/watch?v=x2X6I4LShac', 'What was your favorite mix tape name?', 'My First special �Sebastian LIVE!� Is now available on @amazonprime.', 5, 'user7', '2020-06-26')", "INSERT INTO youtubevideos(url, Title, VideoDescription, comid, PostUser, PostDate) VALUES ('https://www.youtube.com/watch?v=JxhG3H2-EIE', 'For What Its Worth', 'Full video. stand up comedy', 8, 'user2', '2020-06-26')", "INSERT INTO youtubevideos(url, Title, VideoDescription, comid, PostUser, PostDate) VALUES ('https://www.youtube.com/watch?v=1h5sRgW6sQY', 'Bad Apple Metaphor', 'Chris Rocks bad apple metaphor for bad cops.', 4, 'user2', '2020-06-26')", "INSERT INTO youtubevideos(url, Title, VideoDescription, comid, PostUser, PostDate) VALUES ('https://www.youtube.com/watch?v=NBO3vF8p0J0', 'Netflix Is A Joke', 'Kevin Hart shows all of his cards in his very own hilarious and ridiculous way as he talks about getting kicked in the face.', 7, 'user5', '2020-06-26')", "INSERT INTO youtubevideos(url, Title, VideoDescription, comid, PostUser, PostDate) VALUES ('https://www.youtube.com/watch?v=iIp93sEmzQM', 'Has anyone been to the gym lately?', 'STAY HUNGRY Special on @Netflix Is A Joke', 5, 'user6', '2020-06-26')" }; String[] tags = {"INSERT INTO youtubetags(url, Tag) VALUES ('https://www.youtube.com/watch?v=YDkOZaolWQE', 'fluffy, hot')", "INSERT INTO youtubetags(url, Tag) VALUES ('https://www.youtube.com/watch?v=x2X6I4LShac', 'mixtape')", "INSERT INTO youtubetags(url, Tag) VALUES ('https://www.youtube.com/watch?v=JxhG3H2-EIE', 'worth')", "INSERT INTO youtubetags(url, Tag) VALUES ('https://www.youtube.com/watch?v=1h5sRgW6sQY', 'bad, apple, cops')", "INSERT INTO youtubetags(url, Tag) VALUES ('https://www.youtube.com/watch?v=NBO3vF8p0J0', 'netflix, face')", "INSERT INTO youtubetags(url, Tag) VALUES ('https://www.youtube.com/watch?v=iIp93sEmzQM', 'gym')"}; statement = (Statement) connect.createStatement(); try { for(int i = 0; i < dropStatements.length; i++) { statement.execute(dropStatements[i]); } for(int i = 0; i < createStatements.length; i++) { statement.execute(createStatements[i]); } statement.execute(addRootUser); for(int i = 0; i < 10; i++) { statement.execute(users[i]); } for(int i = 0; i < comedians.length; i++) { statement.execute(comedians[i]); } for(int i = 0; i < videos.length; i++) { statement.execute(videos[i]); statement.execute(tags[i]); } } catch (Exception e) { System.out.println("Something went wrong."); for(int i = 1; i < createStatements.length; i++) { statement.execute(createStatements[i]); } for(int i = 0; i < 10; i++) { statement.execute(users[i]); } for(int i = 0; i < comedians.length; i++) { statement.execute(comedians[i]); } for(int i = 0; i < videos.length; i++) { statement.execute(videos[i]); statement.execute(tags[i]); } } statement.close(); disconnect(); } public List<User> getAllUsers() throws SQLException{ List<User> listOfUsers = new ArrayList<User>(); connect_func(); String sql = "SELECT * FROM user"; statement = (Statement) connect.createStatement(); ResultSet resultSet = statement.executeQuery(sql); while (resultSet.next()) { if(resultSet.getString("Username").equals("root")) { continue; }else { String username = resultSet.getString("Username"); String password = resultSet.getString("Password"); String firstName = resultSet.getString("FirstName"); String lastName = resultSet.getString("LastName"); int age = Integer.parseInt(resultSet.getString("Age")); User newUser = new User(username, password, firstName, lastName, age); listOfUsers.add(newUser); } } resultSet.close(); statement.close(); disconnect(); return listOfUsers; } // Function to insert video into MYSQL database. public void insertVideo(String userName, String link, String videoTitle, String videoDescription, String videoTags, String comid) throws SQLException{ connect_func(); // This line of code is to get the current date and convert object to string long millis=System.currentTimeMillis(); java.sql.Date date=new java.sql.Date(millis); String dateString=date.toString(); // This line of code is to see if the url (String link) is already in the youtubevideos table String urlCheck = "SELECT COUNT(*) FROM youtubevideos WHERE URL ='"+ link + "'"; statement = (Statement) connect.createStatement(); ResultSet urlExist = statement.executeQuery(urlCheck); if (urlExist.next()) { int numUrl = urlExist.getInt(1); if (numUrl > 0) { System.out.println("The URL is already in the table cannot add video"); return; } }else { System.out.println("Error checking if the URL exist"); return; } // This line of code is to check if the user has posted more than 5 videos in same day String numberVideoPosts = "SELECT COUNT(*) FROM youtubevideos WHERE PostUser ='"+ userName +"' AND PostDate = '"+ dateString +"'"; ResultSet videoNum = statement.executeQuery(numberVideoPosts); if (videoNum.next()) { int numberOfVideos = videoNum.getInt(1); // 1 is the column number starts at 1 System.out.println("Number of Videos Posted in a day: " + numberOfVideos); if (numberOfVideos < 5) { // if video posts in a day are less than 5 then continue adding video // This line of code is going to extract the comid from the comedian table based on // the nameComedian string which holds the comedians last name which is used to search for // comid in the comedian table. // This line of code is to insert video into youtubevideos table String insert = "INSERT INTO youtubevideos(url, Title, VideoDescription, comid, PostUser, PostDate) " + "VALUES (?, ?, ?, ?, ?, ?)"; preparedStatement = (PreparedStatement) connect.prepareStatement(insert); preparedStatement.setString(1, link); preparedStatement.setString(2, videoTitle); preparedStatement.setString(3, videoDescription); preparedStatement.setString(4, comid); preparedStatement.setString(5, userName); preparedStatement.setString(6, dateString); preparedStatement.executeUpdate(); preparedStatement.close(); // This line of code is to insert into youtubetags table String enter = "INSERT INTO youtubetags(url, Tag) " + "VALUES (?, ?)"; preparedStatement = (PreparedStatement) connect.prepareStatement(enter); preparedStatement.setString(1, link); preparedStatement.setString(2, videoTags); preparedStatement.executeUpdate(); preparedStatement.close(); statement.close(); disconnect(); System.out.println("Sucessfully inserted a video and added video tags"); } else { System.out.println("The number of videos allowed to post in a day exceeds the limit 5"); return; } }else { System.out.println("Error checking number of videos posted in a day"); return; } } public List<YoutubeVideo> getSearchResults(String userInput) throws SQLException { connect_func(); List<YoutubeVideo> searchResults = new ArrayList<YoutubeVideo>(); String sql; if(userInput.contains(" ")) { String[] query = userInput.split(" "); String first = query[0]; String second = query[1]; sql = "SELECT comid FROM comedians WHERE FirstName='" + first + "' OR FirstName='" + second + "' OR LastName='" + first + "' OR LastName='" + second + "'"; }else if(userInput.contains(",")){ String[] query = userInput.split(","); sql = "SELECT url FROM youtubetags WHERE Tag LIKE '%" + query[0] + "%' "; for(int i = 1; i < query.length; i++) { sql = sql.concat("OR Tag LIKE '%" + query[i] +"%' "); } statement = (Statement) connect.createStatement(); ResultSet resultSet = statement.executeQuery(sql); while(resultSet.next()) { String sql2 = "SELECT * FROM youtubevideos WHERE url='" + resultSet.getString("url") + "'"; Statement statement2 = (Statement) connect.createStatement(); ResultSet videoResultSet = statement2.executeQuery(sql2); while(videoResultSet.next()) { YoutubeVideo video = new YoutubeVideo(videoResultSet.getString("url"), videoResultSet.getString("Title"), videoResultSet.getString("PostUser")); searchResults.add(video); } } resultSet.close(); statement.close(); disconnect(); return searchResults; }else { sql = "SELECT comid FROM comedians WHERE FirstName='" + userInput + "' OR LastName='" + userInput + "'"; } statement = (Statement) connect.createStatement(); ResultSet resultSet = statement.executeQuery(sql); List<String> comids = new ArrayList<String>(); while(resultSet.next()) { comids.add(resultSet.getString("comid")); } for(int i = 0; i < comids.size();i++) { String sql2 = "SELECT * FROM youtubevideos WHERE comid='" + comids.get(i) + "'"; ResultSet videoResultSet = statement.executeQuery(sql2); while(videoResultSet.next()) { YoutubeVideo video = new YoutubeVideo(videoResultSet.getString("url"), videoResultSet.getString("Title"), videoResultSet.getString("PostUser")); searchResults.add(video); } } resultSet.close(); statement.close(); disconnect(); return searchResults; } public List<Comedian> getAllComediansNotInFavorite(String givenUsername) throws SQLException{ List<Comedian> allComedians = new ArrayList<Comedian>(); connect_func(); String sql = "SELECT * FROM comedians WHERE comid NOT IN (SELECT comid FROM isfavorite WHERE Username='" + givenUsername +"')"; statement = (Statement) connect.createStatement(); ResultSet comedianResultSet = statement.executeQuery(sql); while(comedianResultSet.next()) { allComedians.add(new Comedian(Integer.parseInt(comedianResultSet.getString("comid")), comedianResultSet.getString("FirstName"), comedianResultSet.getString("LastName"), comedianResultSet.getString("Birthday"), comedianResultSet.getString("BirthPlace"))); } comedianResultSet.close(); statement.close(); disconnect(); return allComedians; } public List<Comedian> getFavoriteList(String givenUsername) throws SQLException{ List<Comedian> favoriteList = new ArrayList<Comedian>(); connect_func(); String sql = "SELECT * FROM isfavorite WHERE Username='" + givenUsername + "'"; statement = (Statement) connect.createStatement(); ResultSet resultSet = statement.executeQuery(sql); List<String> comids = new ArrayList<String>(); while(resultSet.next()) { comids.add(resultSet.getString("comid")); } for(int i = 0; i < comids.size();i++) { String sql2 = "SELECT * FROM comedians WHERE comid='" + comids.get(i) + "'"; ResultSet comedianResultSet = statement.executeQuery(sql2); comedianResultSet.next(); favoriteList.add(new Comedian(Integer.parseInt(comedianResultSet.getString("comid")), comedianResultSet.getString("FirstName"), comedianResultSet.getString("LastName"), comedianResultSet.getString("Birthday"), comedianResultSet.getString("BirthPlace"))); } resultSet.close(); statement.close(); disconnect(); return favoriteList; } public void deleteFromFavorite(String username, String comid) throws SQLException{ String sql = "DELETE FROM isfavorite WHERE Username='" + username + "' AND comid='" + comid + "'"; connect_func(); preparedStatement = (PreparedStatement) connect.prepareStatement(sql); preparedStatement.executeUpdate(); preparedStatement.close(); disconnect(); } public void addToFavorite(String username, String comid) throws SQLException{ String sql = "INSERT INTO isfavorite (Username, comid) VALUES ('" + username + "', '" + comid + "')"; connect_func(); preparedStatement = (PreparedStatement) connect.prepareStatement(sql); preparedStatement.executeUpdate(); preparedStatement.close(); disconnect(); } // add review into the database public void insertReview(String userName, String remark, String rating, String url) throws SQLException{ connect_func(); // This line of code is to insert review into reviews table String insert = "INSERT INTO reviews(Remark, Rating, Author, Youtubeid) " + "VALUES (?, ?, ?, ?)"; preparedStatement = (PreparedStatement) connect.prepareStatement(insert); preparedStatement.setString(1, remark); preparedStatement.setString(2, rating); preparedStatement.setString(3, userName); preparedStatement.setString(4, url); preparedStatement.executeUpdate(); preparedStatement.close(); disconnect(); } // function to get all the reviews public List<Review> getAllReviews(String url) throws SQLException{ List<Review> allReviews = new ArrayList<Review>(); connect_func(); String sql = "SELECT * FROM reviews WHERE Youtubeid='" + url + "'"; statement = (Statement) connect.createStatement(); ResultSet resultSet = statement.executeQuery(sql); while(resultSet.next()) { allReviews.add(new Review(resultSet.getString("Author"), resultSet.getString("Remark"))); } resultSet.close(); statement.close(); disconnect(); return allReviews; } // This function is to check if user posted a review for video return true if did and false if did not public boolean getHasReview(String url, User user) throws SQLException{ connect_func(); String sql="SELECT * FROM reviews WHERE Author='" + user.username +"' AND Youtubeid='" + url + "'"; statement = (Statement)connect.createStatement(); ResultSet resultSet = statement.executeQuery(sql); if(resultSet.next()) { resultSet.close(); statement.close(); disconnect(); return true; }else { resultSet.close(); statement.close(); disconnect(); return false; } } public void videoAddToFavorite(String username, String url) throws SQLException{ connect_func(); String sql= "SELECT comid FROM youtubevideos WHERE url='" + url + "'"; statement = (Statement) connect.createStatement(); ResultSet resultSet = statement.executeQuery(sql); resultSet.next(); String sql2 = "INSERT INTO isfavorite (Username, comid) VALUES ('" + username + "', '" + resultSet.getString("comid") + "')"; preparedStatement = (PreparedStatement) connect.prepareStatement(sql2); preparedStatement.executeUpdate(); preparedStatement.close(); resultSet.close(); statement.close(); disconnect(); } // Function to get the YouTube video based on the url in video page public YoutubeVideo getVideo(String url) throws SQLException { connect_func(); String sql= "SELECT * FROM youtubevideos WHERE url='" + url + "'"; statement = (Statement) connect.createStatement(); ResultSet resultSet = statement.executeQuery(sql); resultSet.next(); YoutubeVideo videoData = new YoutubeVideo(resultSet.getString("url"), resultSet.getString("Title"), resultSet.getString("VideoDescription"), Integer.parseInt(resultSet.getString("comid")), resultSet.getString("PostUser"), resultSet.getDate("PostDate")); resultSet.close(); statement.close(); disconnect(); return videoData; } public boolean isFavorite(String username, String comid) throws SQLException{ connect_func(); String sql = "SELECT * FROM isfavorite WHERE Username='" + username + "' AND comid='" + comid + "'"; statement = (Statement) connect.createStatement(); ResultSet resultSet = statement.executeQuery(sql); if(resultSet.next()) { resultSet.close(); statement.close(); disconnect(); return true; }else { resultSet.close(); statement.close(); disconnect(); return false; } } // Function to get all the comedians when uploading a video to choose which comedian video is for public List<Comedian> getAllComedians() throws SQLException{ //Create a list of type Comedian class to hold all the comedians in each index List<Comedian> comedians = new ArrayList<Comedian>(); connect_func(); String sql = "SELECT * FROM comedians"; statement = (Statement) connect.createStatement(); ResultSet resultSet = statement.executeQuery(sql); while(resultSet.next()) { comedians.add(new Comedian(Integer.parseInt(resultSet.getString("comid")), resultSet.getString("FirstName"), resultSet.getString("LastName"), resultSet.getString("Birthday"), resultSet.getString("BirthPlace"))); } resultSet.close(); statement.close(); disconnect(); return comedians; } public void insertComedian(Comedian newComedian) throws SQLException{ connect_func(); String insert = "INSERT INTO comedians(comid, FirstName, LastName, Birthday, BirthPlace) " + "VALUES (?, ?, ?, ?, ?)"; preparedStatement = (PreparedStatement) connect.prepareStatement(insert); preparedStatement.setString(1, Integer.toString(newComedian.comid)); preparedStatement.setString(2, newComedian.firstName); preparedStatement.setString(3, newComedian.lastName); preparedStatement.setString(4, newComedian.birthday); preparedStatement.setString(5, newComedian.birthPlace); preparedStatement.executeUpdate(); preparedStatement.close(); disconnect(); } public List<ComedianInfo> getVideoCount() throws SQLException{ connect_func(); List<ComedianInfo> comedianData = new ArrayList<ComedianInfo>(); String sql = "SELECT comid, COUNT(comid) FROM youtubevideos GROUP BY comid ORDER BY COUNT(comid) DESC"; statement = (Statement) connect.createStatement(); ResultSet resultSet = statement.executeQuery(sql); resultSet.next(); String sql2 = "SELECT * FROM comedians WHERE comid='" + resultSet.getString(1) + "'"; Statement statement2 = (Statement) connect.createStatement(); ResultSet resultSet2 = statement2.executeQuery(sql2); resultSet2.next(); comedianData.add(new ComedianInfo(new Comedian(resultSet2.getString(2), resultSet2.getString(3)), Integer.parseInt(resultSet.getString(2)))); while(resultSet.next()) { if(Integer.parseInt(resultSet.getString(2)) == comedianData.get(0).getVideoCount()) { String sql3 = "SELECT * FROM comedians WHERE comid='" + resultSet.getString(1) + "'"; Statement statement3 = (Statement) connect.createStatement(); ResultSet resultSet3 = statement3.executeQuery(sql3); resultSet3.next(); comedianData.add(new ComedianInfo(new Comedian(resultSet3.getString(2), resultSet3.getString(3)), Integer.parseInt(resultSet.getString(2)))); } } statement.close(); statement2.close(); resultSet.close(); resultSet2.close(); disconnect(); return comedianData; } public List<String> getCommonFavorites(String user1, String user2) throws SQLException{ connect_func(); List<String> commonFavorites = new ArrayList<String>(); List<Comedian> user1FavoriteList = this.getFavoriteList(user1); List<Comedian> user2FavoriteList = this.getFavoriteList(user2); for(int i = 0; i < user1FavoriteList.size(); i++) { for(int j = 0; j < user2FavoriteList.size(); j++) { if(user2FavoriteList.get(j).getComid() == user1FavoriteList.get(i).getComid()) { commonFavorites.add(user1FavoriteList.get(i).getFirstName() + " " + user1FavoriteList.get(i).getLastName()); break; } } } if(commonFavorites.size() == 0) { if(user1 == null && user2 == null) { commonFavorites.add("Users not selected"); }else { commonFavorites.add("No common favorite comedians between " + user1 + " and " + user2); } } disconnect(); return commonFavorites; } public List<String> getPostiveReviewers() throws SQLException{ connect_func(); List<String> users = new ArrayList<String>(); String sql = "SELECT DISTINCT Author FROM reviews WHERE Rating='G' OR Rating='E'"; statement = (Statement) connect.createStatement(); ResultSet resultSet = statement.executeQuery(sql); while(resultSet.next()) { users.add(resultSet.getString(1)); } if(users.size() == 0) { users.add("No positive reviewers"); } statement.close(); resultSet.close(); disconnect(); return users; } public List<String> getPoorVideos() throws SQLException{ connect_func(); List<String> videos = new ArrayList<String>(); String sql = "SELECT Title FROM youtubevideos YT INNER JOIN reviews R ON YT.url=R.Youtubeid WHERE R.Rating='P'"; statement = (Statement) connect.createStatement(); ResultSet resultSet = statement.executeQuery(sql); while(resultSet.next()) { videos.add(resultSet.getString(1)); } if(videos.size() == 0) { videos.add("No poor videos"); } statement.close(); resultSet.close(); disconnect(); return videos; } public List<MultipleUsers> getSameFavorites() throws SQLException{ connect_func(); List<MultipleUsers> users = new ArrayList<MultipleUsers>(); String sql = "SELECT DISTINCT a.Username, b.Username FROM isfavorite AS a, isfavorite AS b WHERE a.comid=b.comid AND a.Username!=b.Username"; statement = (Statement) connect.createStatement(); ResultSet resultSet = statement.executeQuery(sql); List<MultipleUsers> tempUsers = new ArrayList<MultipleUsers>(); while(resultSet.next()) { tempUsers.add(new MultipleUsers(resultSet.getString(1), resultSet.getString(2))); } for(int i = 0; i < tempUsers.size(); i++) { List<Comedian> user1List = this.getFavoriteList(tempUsers.get(i).getUserOne()); List<Comedian> user2List = this.getFavoriteList(tempUsers.get(i).getUserTwo()); if(user1List.size() == user2List.size()) { if(users.size() == 0) { users.add(tempUsers.get(i)); }else { for(int j = 0; j < users.size(); j++) { if(users.get(j).getUserTwo().equals(tempUsers.get(i).getUserOne()) && users.get(j).getUserOne().equals(tempUsers.get(i).getUserTwo())) { break; }else { users.add(tempUsers.get(i)); break; } } } }else { continue; } } statement.close(); resultSet.close(); disconnect(); return users; } // Function to get all the comedians videos that were posted today public List<Comedian> postedToday() throws SQLException{ // This line of code is to get the current date and convert object to string long millis=System.currentTimeMillis(); java.sql.Date date=new java.sql.Date(millis); String dateString=date.toString(); //Create a list of type Comedian class to hold all the comedians in each index List<Comedian> comedians = new ArrayList<Comedian>(); connect_func(); String sql = "SELECT * FROM comedians C WHERE C.comid NOT IN (SELECT Y.comid FROM youtubevideos Y WHERE PostDate != '"+ dateString + "')"; statement = (Statement) connect.createStatement(); ResultSet resultSet = statement.executeQuery(sql); while(resultSet.next()) { comedians.add(new Comedian(Integer.parseInt(resultSet.getString("comid")), resultSet.getString("FirstName"), resultSet.getString("LastName"), resultSet.getString("Birthday"), resultSet.getString("BirthPlace"))); } resultSet.close(); statement.close(); disconnect(); return comedians; } // Function to get top 3 comedians that were reviewed the most public List<Comedian> topReview() throws SQLException{ //Create a list of type Comedian class to hold all the comedians in each index List<Comedian> comedians = new ArrayList<Comedian>(); connect_func(); String sql = "SELECT *\r\n" + "FROM comedians K,\r\n" + " (SELECT C.comid, COUNT(*) as numReviews\r\n" + " FROM reviews R, youtubevideos Y, comedians C\r\n" + " WHERE R.Youtubeid = Y.url AND Y.comid = C.comid\r\n" + " GROUP BY C.comid\r\n" + " ORDER BY numReviews DESC) AS comedianReviews\r\n" + "WHERE K.comid = comedianReviews.comid \r\n" + "ORDER BY numReviews DESC\r\n" + "LIMIT 3;"; statement = (Statement) connect.createStatement(); ResultSet resultSet = statement.executeQuery(sql); while(resultSet.next()) { comedians.add(new Comedian(Integer.parseInt(resultSet.getString("comid")), resultSet.getString("FirstName"), resultSet.getString("LastName"), resultSet.getString("Birthday"), resultSet.getString("BirthPlace"))); } resultSet.close(); statement.close(); disconnect(); return comedians; } // function to get the tags used by every user public ArrayList<String> topTags() throws SQLException{ connect_func(); // variable to hold MYSQL users tag List<String[]> tags = new ArrayList<String[]>(); // variable to hold , and " " separated tags String[] arrOfTags; String sql = "SELECT GROUP_CONCAT(T.Tag) as \"Tags\"\r\n" + "FROM youtubetags T, youtubevideos V, user U\r\n" + "WHERE T.url = V.url AND V.PostUser = U.Username\r\n" + "GROUP BY U.Username\r\n" + "ORDER BY U.Username;"; statement = (Statement) connect.createStatement(); ResultSet resultSet = statement.executeQuery(sql); while(resultSet.next()) { String listOfTags = resultSet.getString("Tags"); arrOfTags = listOfTags.split("[ ,]+", -2); tags.add(arrOfTags); // each tag element is an [array] of tags } // create hash map that holds all elements in our first users tags Set<String> tagChecker = new HashSet<>(Arrays.asList(tags.get(0))); // Initialize variable to hold matching tags ArrayList<String> matchingElements=new ArrayList<String>(); for(int j = 1; j < tags.size(); j++) { // clear the matchingElements array, first loop this code is redundant. matchingElements.clear(); for (String str : tags.get(j)) { if (tagChecker.contains(str)) { // store matching str in a matchingElements matchingElements.add(str); } } // reached the end of the inner for loop so we clear our hash table and put // in only those tags that were the same for user 1 and user 2 // then we check the same tags that both user 1 and 2 had with the next user // clear and put the ones that are same with user 1, 2, and 3, and do it // until all users have been iterated through (tags.get(i)) tagChecker.clear(); tagChecker.addAll(matchingElements); } resultSet.close(); statement.close(); disconnect(); return matchingElements; } //Function to get comedians whose reviews are ALL excellent public List<Comedian> excellentReview() throws SQLException{ connect_func(); List<Comedian> comedians = new ArrayList<Comedian>(); String sql = "SELECT *\r\n" + "FROM comedians C,\r\n" + "(\r\n" + " SELECT C.FirstName, Group_concat(R.Rating) as Rating\r\n" + " FROM reviews R, youtubevideos Y, comedians C\r\n" + " WHERE R.Youtubeid = Y.url AND Y.comid = C.comid\r\n" + " GROUP BY C.FirstName) as excellent\r\n" + "WHERE excellent.Rating NOT LIKE '%P%' AND excellent.Rating NOT LIKE '%F%' AND excellent.Rating NOT LIKE '%G%' \r\n" + "AND C.FirstName = excellent.FirstName;"; statement = (Statement) connect.createStatement(); ResultSet resultSet = statement.executeQuery(sql); while(resultSet.next()) { comedians.add(new Comedian(Integer.parseInt(resultSet.getString("comid")), resultSet.getString("FirstName"), resultSet.getString("LastName"), resultSet.getString("Birthday"), resultSet.getString("BirthPlace"))); } resultSet.close(); statement.close(); disconnect(); return comedians; } public List<YoutubeVideo>excellentComediansVideos(String comidId) throws SQLException{ connect_func(); List<YoutubeVideo> videoData = new ArrayList<YoutubeVideo>(); String URL; String endOfUrl; int i = 0; String sql = "SELECT * FROM comedians C, youtubevideos Y WHERE C.comid = Y.comid AND Y.comid ='"+ comidId + "'"; statement = (Statement) connect.createStatement(); ResultSet resultSet = statement.executeQuery(sql); while(resultSet.next()) { videoData.add(new YoutubeVideo(resultSet.getString("url"), resultSet.getString("Title"), resultSet.getString("VideoDescription"), Integer.parseInt(resultSet.getString("comid")), resultSet.getString("PostUser"), resultSet.getDate("PostDate"))); URL = videoData.get(i).getUrl(); endOfUrl = URL.split("=")[1]; videoData.get(i).setUrl(endOfUrl); i++; } resultSet.close(); statement.close(); disconnect(); return videoData; } public List<User> topPost() throws SQLException{ connect_func(); List<User> topUsers = new ArrayList<User>(); String sql = "SELECT *\r\n" + "FROM\r\n" + "(\r\n" + "SELECT totalUploads.Username, totalUploads.numOfVideos\r\n" + "FROM\r\n" + " (\r\n" + " SELECT U.Username, COUNT(*) AS numOfVideos \r\n" + " FROM user U, youtubevideos Y \r\n" + " WHERE U.Username = Y.PostUser\r\n" + " GROUP BY U.Username\r\n" + " ORDER BY numOfVideos DESC) as totalUploads\r\n" + "WHERE totalUploads.numOfVideos = (SELECT MAX(numVideos)\r\n" + "FROM\r\n" + " (\r\n" + " SELECT COUNT(U.Username) as numVideos\r\n" + " FROM user U, youtubevideos Y \r\n" + " WHERE U.Username = Y.PostUser\r\n" + " GROUP BY U.Username) as temp)) as temp2, user P\r\n" + "WHERE P.Username = temp2.Username;"; statement = (Statement) connect.createStatement(); ResultSet resultSet = statement.executeQuery(sql); while(resultSet.next()) { topUsers.add(new User(resultSet.getString("Username"), resultSet.getString("Password"), resultSet.getString("FirstName"), resultSet.getString("LastName"), Integer.parseInt(resultSet.getString("Age")))); } resultSet.close(); statement.close(); disconnect(); return topUsers; } public List<YoutubeVideo>userVideos(String userName) throws SQLException{ connect_func(); List<YoutubeVideo> videoData = new ArrayList<YoutubeVideo>(); String URL; String endOfUrl; int i = 0; String sql = "SELECT * FROM user U, youtubevideos Y WHERE U.Username = Y.PostUser AND Y.PostUser ='"+ userName + "'"; statement = (Statement) connect.createStatement(); ResultSet resultSet = statement.executeQuery(sql); while(resultSet.next()) { videoData.add(new YoutubeVideo(resultSet.getString("url"), resultSet.getString("Title"), resultSet.getString("VideoDescription"), Integer.parseInt(resultSet.getString("comid")), resultSet.getString("PostUser"), resultSet.getDate("PostDate"))); URL = videoData.get(i).getUrl(); endOfUrl = URL.split("=")[1]; videoData.get(i).setUrl(endOfUrl); i++; } resultSet.close(); statement.close(); disconnect(); return videoData; } }
package com.jzx.validate.example.service; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.jzx.validate.core.message.Message; import com.jzx.validate.example.domain.User; public class ExampleServiceImpl implements ExampleService { private static Logger LOGGER = LoggerFactory.getLogger(ExampleServiceImpl.class); public Message validateExample(User user) throws Exception { LOGGER.warn("pass validate!"); return new Message(); } }
package Day3; import java.util.ArrayList; import java.util.Arrays; import java.util.Scanner; public class EnglishToPigLatin { public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("Welcome to the Pig Latin Translator"); Scanner sc=new Scanner(System.in); String choice="y"; char[] arrayOfVowels= new char[]{'a','e','i','o','u'}; String englishText=""; while(choice.equalsIgnoreCase("y")){ System.out.println("Enter a line to be translated to Pig Latin"); //ask the user the text to be translated englishText=sc.nextLine(); //convert the text entered by the user in lowercase englishText=englishText.toLowerCase(); String translatedText=""; //split the text into words String[] englishTextWord=englishText.split(" "); //run the loop to check for different criterias in each word for(int i=0;i<englishTextWord.length;i++){ //find the index of y in the word int indexOfY=englishTextWord[i].indexOf('y'); for(char c:arrayOfVowels){ //if the first character is vowel then add "way" to the word if(englishTextWord[i].charAt(0)==c | (indexOfY!=0 && indexOfY!=-1)){ englishTextWord[i]+="way"; break; } //if the first character is consonant then find the index of vowel and shift the part prior to it at last and add "ay" at the end else{ int a=englishTextWord[i].indexOf(c); if(a!=-1){ englishTextWord[i]=englishTextWord[i].substring(a)+englishTextWord[i].substring(0,a)+"ay"; break; } } } translatedText+=englishTextWord[i]+" "; } System.out.println(translatedText); choice=Validator.getChoice(sc, "Translate another line?(y/n) :"); System.out.println(); } } }
package com.czx.web.servlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * @author Morgan * @date 2020/12/1 16:00 */ public class Model { private HttpServletRequest request; private HttpServletResponse response; public Model(HttpServletRequest request, HttpServletResponse response) { this.request = request; this.response = response; setEncoding(); } private void setEncoding() { response.setCharacterEncoding("UTF-8"); response.setContentType("text/html;charset=utf-8"); } public HttpServletRequest getRequest() { return request; } public void setRequest(HttpServletRequest request) { this.request = request; } public HttpServletResponse getResponse() { return response; } public void setResponse(HttpServletResponse response) { this.response = response; } }
package com.benz.event.receiver.service; import com.benz.event.receiver.model.Event; /** * The Interface EventReceiverService. */ public interface EventReceiverService { /** * Process event. * * @param event the event */ public void processEvent(Event event); }
package piefarmer.immunology.lib; public class Ids { public static final int blockmedrestblID_default = 192; public static int blockmedrestblID_actual; public static final int blockdiatblID_default = 193; public static int blockdiatblID_actual; public static final int blockrockID_default = 195; public static int blockrockID_actual; public static final int blocktorchID_default = 194; public static int blocktorchID_actual; public static final int blockcustomflowerID_default = 196; public static int blockcustomflowerID_actual; public static final int itemdiseaseID_default = 22943; public static int itemdiseaseID_actual; public static final int itemcureID_default = 22944; public static int itemcureID_actual; public static final int itemeffectID_default = 22945; public static int itemeffectID_actual; public static final int itemhanggliderID_default = 22947; public static int itemhanggliderID_actual; public static final int itemmedicalbookID_default = 22948; public static int itemmedicalbookID_actual; }
package com.example.demo.model; public class Sessao { private Pessoa pessoa; private Usuario usuario; private TokenRedis tokenRedis; public Pessoa getPessoa() { return pessoa; } public void setPessoa(Pessoa pessoa) { this.pessoa = pessoa; } public Usuario getUsuario() { return usuario; } public void setUsuario(Usuario usuario) { this.usuario = usuario; } public TokenRedis getTokenRedis() { return tokenRedis; } public void setTokenRedis(TokenRedis tokenRedis) { this.tokenRedis = tokenRedis; } }
public class Supermarket { public void addPerson(Person person, SuperPersonQueue queue) { queue.insert(person); } public void servePerson(SuperPersonQueue queue) { queue.retrieve(); } }
package parser.lexer; import parser.Lexer; import parser.Token; import java.io.IOException; import java.io.PrintStream; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Set; public class LexerImpl implements Lexer, StrategyFactoryMethod { protected Strategy strategy; private List<String> ignoredSymbols; private Map<String, Consumer> charConsumers; private transient InputText input; private List<TokenListener> listeners; private transient boolean debug; public LexerImpl(List ignoredSymbols, Map charConsumers) { setConsumers(ignoredSymbols, charConsumers); } public void addTokenListener(Lexer.TokenListener tokenListener) { if (listeners == null) listeners = new ArrayList<>(1); listeners.add(tokenListener); } public void removeTokenListener(Lexer.TokenListener tokenListener) { if (listeners != null) listeners.remove(tokenListener); } private void setConsumers(List<String> ignoredSymbols, Map<String, Consumer> charConsumers) { this.charConsumers = charConsumers; // store for check at setTerminals() this.ignoredSymbols = ignoredSymbols; // need to know which token should be ignored for (String sym : ignoredSymbols) { ensureStrategy().addIgnoringConsumer(sym, charConsumers.get(sym)); } for (Consumer consumer : charConsumers.values()) { consumer.setStrategyFactoryMethod(this); } } private Strategy ensureStrategy() { if (strategy == null) strategy = newStrategy(); return strategy; } public Strategy newStrategy() { return new Strategy(); } public void setInput(Object text) throws IOException { input = new InputText(text); } public void setTerminals(List terminals) { for (Object terminal : terminals) { String symbol = (String) terminal; // check if it is a terminal as this is a public call if (symbol.length() <= 2 || !Token.isTerminal(symbol)) throw new IllegalArgumentException("Terminals must be enclosed within quotes: " + symbol); String text = symbol.substring(1, symbol.length() - 1); // remove quotes if (!ensureStrategy().hasTerminal(symbol)) { // could have been called for second time if (symbol.charAt(0) == Token.COMMAND_QUOTE) { // is a scan terminal covered by a Consumer Consumer cc = charConsumers.get(text); if (cc == null) throw new IllegalArgumentException("Lexer token is not among character consumers: " + text); else ensureStrategy().addTokenConsumer(symbol, cc); } else { ensureStrategy().addTokenConsumer(symbol, new Consumer(text)); } } } // end for if (debug) System.err.println("StrategyList is:\n" + strategy); } public void clear() { } public Token getNextToken(LexerSemantic lexerSemantic) throws IOException { return getNextToken(lexerSemantic, null); } public Token getNextToken(Map expectedTokenSymbols) throws IOException { return getNextToken(null, expectedTokenSymbols); } private Token getNextToken(LexerSemantic lexerSemantic, Map expectedTokenSymbols) throws IOException { if (input == null) throw new IllegalStateException("Lexer has no input, call setInput(...)."); Token.Address start = new Token.Address(input.getScanLine(), input.getScanColumn(), input.getScanOffset()); int c = input.peek(); // read lookahead if (c == Input.EOF) return createToken(Token.EPSILON, null, new Token.Range(start, start)); // not EOF, there must be a lexer item or error Strategy.Item item = getNextLexerItem(expectedTokenSymbols, c); if (item != null) { // successful scan if (ignoredSymbols != null && ignoredSymbols.indexOf(item.getSymbol()) >= 0) { if (listeners != null && listeners.size() > 0) // creating a token takes time, do it only when listeners are present fireTokenReceived(createToken(item.getTokenIdentifier(), item.getResultTree(), lexerSemantic), true); return getNextToken(expectedTokenSymbols); } else { Token token = createToken(item.getTokenIdentifier(), item.getResultTree(), lexerSemantic); fireTokenReceived(token, false); return token; } } // error state, return an error Token with null symbol Token.Address end = new Token.Address(input.getReadLine(), input.getReadColumn(), input.getScanOffset()); return createToken(null, input.getUnreadText(), new Token.Range(start, end)); } // strategic scan of next item private Strategy.Item getNextLexerItem(Map expectedTokenSymbols, int lookahead) throws IOException { if (strategy == null) throw new IllegalStateException("Lexer has no terminals, call setTerminals(syntaxSeparation.getTokenSymbols())."); Strategy.Item item = strategy.consume(input, lookahead, expectedTokenSymbols); if (item != null) input.resolveBuffer(); // forget old contents return item; } // calls the token listeners with scanned token private void fireTokenReceived(Token token, boolean ignored) { for (int i = 0; listeners != null && i < listeners.size(); i++) (listeners.get(i)).tokenReceived(token, ignored); } protected Token createToken(String tokenIdentifier, ResultTree result, LexerSemantic lexerSemantic) { if (lexerSemantic != null) loopResultTree(result, lexerSemantic); return createToken(tokenIdentifier, result.toString(), result.getRange()); // toString() takes time as it builds the token text } protected Token createToken(String tokenIdentifier, String text, Token.Range range) { return new Token(tokenIdentifier, text, range); } public boolean lex(LexerSemantic lexerSemantic) throws IOException { int c = input.peek(); boolean eof = (c == Input.EOF); boolean error = eof; if (error == false) { Strategy.Item item = getNextLexerItem(null, c); error = (item == null || item.getTokenIdentifier() == null); if (error == false && lexerSemantic != null) loopResultTree(item.getResultTree(), lexerSemantic); c = input.peek(); eof = (c == Input.EOF); error = (eof == false); } if (error) { dump(System.err); System.err.println("Could not process character '" + (char) c + "' (int " + c + "), at line/column " + input.getScanLine() + "/" + input.getScanColumn() + ", at offset " + input.getScanOffset()); } return error == false; } protected void loopResultTree(ResultTree result, LexerSemantic lexerSemantic) { Set wantedNonterminals = lexerSemantic.getWantedNonterminals(); Set ignoredNonterminals = lexerSemantic.getIgnoredNonterminals(); String nonterminal = result.getRule().getNonterminal(); if (!nonterminal.startsWith(Token.ARTIFICIAL_NONTERMINAL_START_CHARACTER) && (wantedNonterminals == null || wantedNonterminals.contains(nonterminal)) && (ignoredNonterminals == null || !ignoredNonterminals.contains(nonterminal))) { lexerSemantic.ruleEvaluated(result.getRule(), result); } for (int i = 0; i < result.getChildCount(); i++) { Object child = result.getChild(i); if (child instanceof ResultTree) loopResultTree((ResultTree) child, lexerSemantic); } } // debug methods public void setDebug(boolean debug) { this.debug = debug; } public String getLineText() { return input.getLine(); } public void dump(PrintStream out) { int lineNr = input.getReadLine(); String line = getLineText(); if (lineNr > 1) { String prevLine = input.getPreviousLine(); out.print((lineNr - 1) + ":\t"); out.println(prevLine); } out.print(lineNr + ":\t"); out.println(line); int nrLen = Integer.toString(lineNr).length(); for (int i = 0; i < nrLen; i++) out.print(" "); out.print("\t"); int errPos = input.getReadColumn(); for (int i = 0; i < errPos && i < line.length(); i++) if (line.charAt(i) == '\t') out.print("\t"); else out.print(" "); out.println("^"); } }
package com.vilio.bps.inquiry.service; import com.vilio.bps.commonMapper.pojo.BpsCompanyInquiryApply; import com.vilio.bps.inquiry.pojo.InquiryBaseValueBean; import java.util.Map; /** * Created by lenovo on 2017/6/12. */ public interface InquiryBaseService { public InquiryBaseValueBean sendInquiryRequ(BpsCompanyInquiryApply apply) throws Exception; }
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF 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.apache.commons.net.ftp.parser; import org.apache.commons.net.ftp.FTPClientConfig; import org.apache.commons.net.ftp.FTPFileEntryParser; /** * The interface describes a factory for creating FTPFileEntryParsers. * * @since 1.2 */ public interface FTPFileEntryParserFactory { /** * <p> * Implementation should be a method that extracts a key from the supplied {@link FTPClientConfig FTPClientConfig} parameter and creates an object * implementing the interface FTPFileEntryParser and uses the supplied configuration to configure it. * </p> * <p> * Note that this method will generally not be called in scenarios that call for autodetection of parser type but rather, for situations where the user * knows that the server uses a non-default configuration and knows what that configuration is. * </p> * * @param config A {@link FTPClientConfig FTPClientConfig} used to configure the parser created * * @return the {@link FTPFileEntryParser} so created. * @throws ParserInitializationException Thrown on any exception in instantiation * @since 1.4 */ FTPFileEntryParser createFileEntryParser(FTPClientConfig config) throws ParserInitializationException; /** * Implementation should be a method that decodes the supplied key and creates an object implementing the interface FTPFileEntryParser. * * @param key A string that somehow identifies an FTPFileEntryParser to be created. * * @return the FTPFileEntryParser created. * @throws ParserInitializationException Thrown on any exception in instantiation */ FTPFileEntryParser createFileEntryParser(String key) throws ParserInitializationException; }
package com.xhpower.qianmeng.service; import com.xhpower.qianmeng.entity.Article; import com.baomidou.mybatisplus.service.IService; /** * <p> * 服务类 * </p> * * @author lyc * @since 2018-07-27 */ public interface ArticleService extends IService<Article> { }
package com.yougou.merchant.api.supplier.service; import java.util.Date; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import com.yougou.merchant.api.common.PageFinder; import com.yougou.merchant.api.common.Query; import com.yougou.merchant.api.supplier.vo.ExpressTemplate; import com.yougou.merchant.api.supplier.vo.MerchantBankInfoVo; import com.yougou.merchant.api.supplier.vo.MerchantMenu; import com.yougou.merchant.api.supplier.vo.MerchantOperationLog; import com.yougou.merchant.api.supplier.vo.MerchantRejectedAddressVo; import com.yougou.merchant.api.supplier.vo.MerchantUser; /** * * 招商系统-招商基本信息service接口类 * * @author mei.jf * @date 2013-12-16 * */ public interface IMerchantsApi { /** * 查询商家售后退货地址列表 * * @author wang.m * @date 2012-05-11 */ public PageFinder<MerchantRejectedAddressVo> getMerchantRejectedAddressList(MerchantRejectedAddressVo vo, Query query); /** * 查询商家账号列表 (分页展示) * * @param user * @param query * @return */ public PageFinder<MerchantUser> queryMerchantUserList(MerchantUser user, Query query); /** * 保存商家账户信息 * * @param vo * @return * @throws Exception */ boolean saveMerchantUser(MerchantUser vo) throws Exception; void updateMerchantUser(MerchantUser vo); MerchantUser getMerchantUserById(String id); /** * 查询商家操作日志列表 * * @param merchantCode * @param query * @return */ public PageFinder<MerchantOperationLog> queryMerchantOperLogList(String merchantCode, Query query); void saveMerchantOperationLog(MerchantOperationLog log); /** * 保存商家售后退货地址数据 * * @author wang.m * @date 2012-05-11 */ public boolean saveMerchantRejectedAddress(HttpServletRequest req, MerchantRejectedAddressVo merchantRejectedAddress); /** * 根据id查询商家售后退货地址列表 * * @author mei.jf * @date 2013-12-18 */ public MerchantRejectedAddressVo getMerchantRejectedAddressById(String id); /** * 判断商家退货地址是否已经存在 * * @throws Exception */ public boolean exictRejectedAddressCount(String supplierName); /** * 商家中心菜单资源管理 * @param menuName * @param query * @return */ public PageFinder<MerchantMenu> queryMerchantMenuList(String menuName, Query query); public MerchantMenu getMerchantMenuById(String id); public boolean insertMerchantMenu(MerchantMenu menu); public boolean updateMerchantMenu(MerchantMenu menu); /** * 查询优购管理员 所拥有的商家列表 * * @param userId (优购管理员userId) * @param merchantCode * @param merchantName * @param isInputYougouWarehouse * @param query * @return */ public PageFinder<Map<String, Object>> queryYougouAdminMerchantList(String userId, String merchantCode, String merchantName, Integer isInputYougouWarehouse, Query query); /** * 查询优购管理员 没有拥有的商家列表 * * @param userId (优购管理员userId) * @param merchantCode * @param merchantName * @param isInputYougouWarehouse * @param query * @return */ public PageFinder<Map<String, Object>> queryMerchantNotHadList(String userId, String merchantCode, String merchantName, Integer isInputYougouWarehouse, Query query); /** * 快递公司模板 * * @param vo */ void insertExpressTemplate(ExpressTemplate vo); void updateExpressTemplate(ExpressTemplate vo); ExpressTemplate getExpressTemplateById(String id); /** * 计算出时间段内商家发货日时长 * @param startDate 开始时间 yyyy-MM-dd hh:mm:ss * @param endDate 结束时间 yyyy-MM-dd hh:mm:ss * @return 时长,0表时当天为非发货日,-1 表于开始时间不能大于结束时间,-2时间段不能大于30天 * @throws Exception */ public Double getShipmentDayHour(String startDate,String endDate) throws Exception; /** * 计算出当前时间到某个时间发货有效时间 * @param startDate 开始时间 yyyy-MM-dd hh:mm:ss * @return 时长,-1 表于开始时间不能大于结束时间 * @throws Exception */ public Double getShipmentCountdownHour(Date startDate,Date endDate) throws Exception; /** * * 查询商结算银行和开票银行,如两条银行信息一样则合并为一条数据,如果不一样,第一条信息为结算银行第二条为开票银行 * @return */ public MerchantBankInfoVo queryMerchantBankInfo(String merchantCode); }
package c1xml; import java.awt.Color; import java.awt.EventQueue; import java.awt.Font; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JOptionPane; import javax.swing.JRadioButton; import javax.swing.ButtonGroup; import javax.swing.JButton; import javax.swing.JComboBox; import java.awt.event.ActionListener; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import java.text.SimpleDateFormat; import java.awt.event.ActionEvent; import javax.swing.JTextField; import java.time.LocalDate; import java.util.Date; import java.util.Random; public class InputScreen { public JFrame frame; public static JTextField SenderSchemeID; public static JTextField SenderNZBN; public static JTextField SenderParticipantID; public static JTextField ReceiverSchemeID; public static JTextField ReceiverNZBN; public static JTextField ReceiverParticipantID; public static JTextField SupplierName; public static JTextField SupplierAddress1; public static JTextField SupplierAddress2; public static JTextField SupplierCity; public static JTextField SupplierPostcode; public static JTextField SupplierCountryCode; public static JTextField CustomerName; public static JTextField CustomerAddress1; public static JTextField CustomerAddress2; public static JTextField CustomerCity; public static JTextField CustomerPostcode; public static JTextField CustomerCountryCode; public static JTextField BuyerReference; public static JTextField POReference; public static JTextField TaxScheme; public static JTextField InvoiceLineChargeReason; public static JTextField GoodsDescription1; public static JTextField GoodsDescription2; public static JTextField GoodsDescription3; // Invoice Level Charge public static JTextField AllowanceChargeDescription; public static JTextField InvoiceLevelAllowance; public static JTextField InvoiceLevelCharge; public static JTextField Quantity1; public static JTextField Quantity2; public static JTextField Quantity3; public static JTextField BaseAmount1; public static JTextField BaseAmount2; public static JTextField BaseAmount3; public static JTextField Discount1; public static JTextField Discount2; public static JTextField Discount3; public static JTextField LineCharge1; public static JTextField LineCharge2; public static JTextField LineCharge3; public static JTextField PriceAmount1; public static JTextField PriceAmount2; public static JTextField PriceAmount3; public static JTextField LineExtensionAmount1; public static JTextField LineExtensionAmount2; public static JTextField LineExtensionAmount3; public static JTextField LineExtensionAmountTotal; public static JTextField TaxableAmount; public static JTextField TaxAmount; public static JTextField TaxExclusiveAmount; public static JTextField TaxInclusiveAmount; public static JTextField AllowanceTotalAmount; public static JTextField ChargeTotalAmount; public static JTextField PayableAmount; public static String sMODE = "sPAYLOAD"; public static String sCurrencyID = "NZD"; public static String sTaxCategoryID = "S"; public static String sPercent1 = "15"; public static String sPercent2 = "15"; public static String sPercent3 = "15"; public static String sPercent4 = "15"; //Allowance tax rate public static String sUnitCode = "C62"; public static String sAllowanceChargeReason = "Item Packaging"; // Optional Fields public static JTextField InvoiceDueDate; public static JTextField SupplierTaxIdentifier; public static JTextField SupplierContactName; public static JTextField SupplierContactTelephone; public static JTextField SupplierContactEmail; // // Payment Means public static JTextField PaymentMeansName; public static JTextField PaymentMeansAccount; public static String sPaymentMeansCode = "1"; /** * Launch the application. */ public static void main(String[] args) { EventQueue.invokeLater(new Runnable() { public void run() { try { InputScreen window = new InputScreen(); window.frame.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } }); } /** * Create the application. */ public InputScreen() { initialize(); } /** * Initialize the contents of the frame. */ private void initialize() { frame = new JFrame(); // 10, 10 is top LH Corner, then width & height frame.setBounds(10, 10, 1200, 650); frame.setTitle("XML Generator - Henry Buck Open Source Software (HBOSS)"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.getContentPane().setLayout(null); // ********************************************************// // ************* ALL LABELS HERE **********************// // ********************************************************// // Combo Boxes to select Sender & Receiver JLabel lblAPNorth = new JLabel("SENDER (AP North)"); lblAPNorth.setBounds(15, 15, 150, 15); frame.getContentPane().add(lblAPNorth); JLabel lblAPSouth = new JLabel("RECEIVER (AP South)"); lblAPSouth.setBounds(400, 15, 150, 15); frame.getContentPane().add(lblAPSouth); // Set italic font for the Participant ID's Font font = new Font("Verdana", Font.ITALIC, 12); JLabel lblSenderParticipantID = new JLabel("Participant ID"); lblSenderParticipantID.setBounds(15, 35, 150, 15); lblSenderParticipantID.setFont(font); frame.getContentPane().add(lblSenderParticipantID); JLabel lblReceiverParticipantID = new JLabel("Participant ID"); lblReceiverParticipantID.setFont(font); lblReceiverParticipantID.setBounds(400, 35, 150, 15); frame.getContentPane().add(lblReceiverParticipantID); // Supplier labels adding 15 to 2nd each time JLabel lblSupplierName = new JLabel("Supplier Name"); lblSupplierName.setBounds(15, 65, 150, 15); frame.getContentPane().add(lblSupplierName); JLabel lblSupplierAddress1 = new JLabel("Supplier Address1"); lblSupplierAddress1.setBounds(15, 80, 150, 15); frame.getContentPane().add(lblSupplierAddress1); JLabel lblSupplierAddress2 = new JLabel("Supplier Address2"); lblSupplierAddress2.setBounds(15, 95, 150, 15); frame.getContentPane().add(lblSupplierAddress2); JLabel lblSupplierCity = new JLabel("City"); lblSupplierCity.setBounds(70, 110, 150, 15); frame.getContentPane().add(lblSupplierCity); JLabel lblSupplierPostcode = new JLabel("Postcode"); lblSupplierPostcode.setBounds(70, 125, 150, 15); frame.getContentPane().add(lblSupplierPostcode); JLabel lblSupplierCountry = new JLabel("Country Code"); lblSupplierCountry.setBounds(70, 140, 150, 15); frame.getContentPane().add(lblSupplierCountry); // Customer labels adding 15 to 2nd each time JLabel lblCustomerName = new JLabel("Customer Name"); lblCustomerName.setBounds(400, 65, 150, 15); frame.getContentPane().add(lblCustomerName); JLabel lblCustomerAddress1 = new JLabel("Customer Address1"); lblCustomerAddress1.setBounds(400, 80, 150, 15); frame.getContentPane().add(lblCustomerAddress1); JLabel lblCustomerAddress2 = new JLabel("Customer Address2"); lblCustomerAddress2.setBounds(400, 95, 150, 15); frame.getContentPane().add(lblCustomerAddress2); JLabel lblCustomerCity = new JLabel("City"); lblCustomerCity.setBounds(470, 110, 150, 15); frame.getContentPane().add(lblCustomerCity); JLabel lblCustomerPostcode = new JLabel("Postcode"); lblCustomerPostcode.setBounds(470, 125, 150, 15); frame.getContentPane().add(lblCustomerPostcode); JLabel lblCustomerCountry = new JLabel("Country Code"); lblCustomerCountry.setBounds(470, 140, 150, 15); frame.getContentPane().add(lblCustomerCountry); // Buyer Reference or Purchase Order Reference is Mandatory JLabel lblBuyerReference = new JLabel("Buyer Reference"); lblBuyerReference.setBounds(825, 15, 150, 15); frame.getContentPane().add(lblBuyerReference); JLabel lblPOReference = new JLabel("Purchase Order Ref"); lblPOReference.setBounds(825, 30, 150, 15); frame.getContentPane().add(lblPOReference); // Tax Scheme JLabel lblTaxScheme = new JLabel("Tax Scheme"); lblTaxScheme.setBounds(825, 50, 150, 15); frame.getContentPane().add(lblTaxScheme); // Unit Code (Required) JLabel lblUnitCode = new JLabel("Unit Code"); lblUnitCode.setBounds(825, 70, 150, 15); frame.getContentPane().add(lblUnitCode); // Allowance/Charge reason (or Code) - Required JLabel lblAllowanceChargeReason = new JLabel("Line Level Allowance"); lblAllowanceChargeReason.setBounds(825, 90, 150, 15); frame.getContentPane().add(lblAllowanceChargeReason); JLabel lblAllowanceChargeReason2 = new JLabel("/Charge Reason"); lblAllowanceChargeReason2.setBounds(825, 100, 150, 15); frame.getContentPane().add(lblAllowanceChargeReason2); // Invoice Due Date JLabel lblInvoiceDueDate = new JLabel("Invoice Due Date"); lblInvoiceDueDate.setBounds(825, 120, 150, 15); frame.getContentPane().add(lblInvoiceDueDate); // Invoice Line Headers JLabel lblHeader = new JLabel("INVOICE LINES:"); lblHeader.setBounds(15, 200, 150, 15); frame.getContentPane().add(lblHeader); JLabel lblDescription = new JLabel("Invoiced Item - Name / Description"); lblDescription.setBounds(15, 215, 200, 15); frame.getContentPane().add(lblDescription); // JLabel lblAsterix = new JLabel("*"); lblAsterix.setBounds(325, 205, 60, 15); frame.getContentPane().add(lblAsterix); // JLabel lblAsterix2 = new JLabel("* base prices are rounded to 6 decimal places"); lblAsterix2.setBounds(100, 580, 300, 15); frame.getContentPane().add(lblAsterix2); // JLabel lblQuantity = new JLabel("Quantity"); lblQuantity.setBounds(325, 220, 60, 15); frame.getContentPane().add(lblQuantity); // // Base Amount label is split over 2 lines JLabel lblBaseAmount1 = new JLabel("Base"); lblBaseAmount1.setBounds(410, 205, 100, 15); frame.getContentPane().add(lblBaseAmount1); JLabel lblBaseAmount2 = new JLabel("Amount $"); lblBaseAmount2.setBounds(410, 220, 100, 15); frame.getContentPane().add(lblBaseAmount2); // Item Level Allowance/Charge is split over 2 lines JLabel lblDiscount1 = new JLabel("Item Level"); lblDiscount1.setBounds(495, 205, 100, 15); frame.getContentPane().add(lblDiscount1); JLabel lblDiscount2 = new JLabel("Discount $"); lblDiscount2.setBounds(495, 220, 100, 15); frame.getContentPane().add(lblDiscount2); // Line Level Allowance/Charge is split over 2 lines JLabel lblLineDiscount1 = new JLabel("Line Level"); lblLineDiscount1.setBounds(595, 205, 100, 15); frame.getContentPane().add(lblLineDiscount1); JLabel lblLineDiscount2 = new JLabel("Charge $(0.00)"); lblLineDiscount2.setBounds(595, 220, 100, 15); frame.getContentPane().add(lblLineDiscount2); // Calculated Fields: JLabel lblPriceAmount = new JLabel("Price Amount"); lblPriceAmount.setBounds(800, 220, 100, 15); frame.getContentPane().add(lblPriceAmount); JLabel lblLineExtensionAmount = new JLabel("Line Extension Amount ($0.00)"); lblLineExtensionAmount.setBounds(920, 220, 200, 15); frame.getContentPane().add(lblLineExtensionAmount); JLabel lblLineExtensionAmountTotal = new JLabel("Line Extension Amount Total"); lblLineExtensionAmountTotal.setBounds(740, 300, 200, 15); frame.getContentPane().add(lblLineExtensionAmountTotal); // Invoice Level Allowance / Charge JLabel lblAllowanceChargeHeader = new JLabel("INVOICE LEVEL : (Description)"); lblAllowanceChargeHeader.setBounds(15, 300, 300, 15); frame.getContentPane().add(lblAllowanceChargeHeader); // JLabel lblILAllowance = new JLabel("Allowance"); lblILAllowance.setBounds(325, 300, 80, 15); frame.getContentPane().add(lblILAllowance); // JLabel lblILCharge = new JLabel("Charge ($0.00)"); lblILCharge.setBounds(410, 300, 150, 15); frame.getContentPane().add(lblILCharge); // Tax labels JLabel lblTaxableAmount = new JLabel("Taxable Amount"); lblTaxableAmount.setBounds(810, 320, 100, 15); frame.getContentPane().add(lblTaxableAmount); JLabel lblTaxAmount = new JLabel("Tax Amount"); lblTaxAmount.setBounds(833, 340, 100, 15); frame.getContentPane().add(lblTaxAmount); JLabel lblTaxExclusiveAmount = new JLabel("Tax Exclusive Amount"); lblTaxExclusiveAmount.setBounds(777, 360, 200, 15); frame.getContentPane().add(lblTaxExclusiveAmount); JLabel lblTaxInclusiveAmount = new JLabel("Tax Inclusive Amount"); lblTaxInclusiveAmount.setBounds(782, 380, 200, 15); frame.getContentPane().add(lblTaxInclusiveAmount); JLabel lblAllowanceAmount = new JLabel("Allowance Total Amount"); lblAllowanceAmount.setBounds(765, 400, 200, 15); frame.getContentPane().add(lblAllowanceAmount); JLabel lblChargeAmount = new JLabel("Charge Total Amount"); lblChargeAmount.setBounds(784, 420, 200, 15); frame.getContentPane().add(lblChargeAmount); JLabel lblPayableAmount = new JLabel("PAYABLE AMOUNT"); lblPayableAmount.setBounds(799, 440, 200, 15); frame.getContentPane().add(lblPayableAmount); // Optional Fields (best practice) JLabel lblOptionalHeader = new JLabel("------ OPTIONAL DATA (Best Practice) -----------------------"); lblOptionalHeader.setForeground(Color.RED); lblOptionalHeader.setBounds(15, 350, 350, 15); frame.getContentPane().add(lblOptionalHeader); JLabel lblSupplierTaxIdentifier = new JLabel("Supplier Tax Identifier"); lblSupplierTaxIdentifier.setBounds(15, 375, 200, 15); frame.getContentPane().add(lblSupplierTaxIdentifier); JLabel lblSupplierContactHeader = new JLabel("Supplier Contact Details :"); lblSupplierContactHeader.setBounds(15, 405, 200, 15); frame.getContentPane().add(lblSupplierContactHeader); JLabel lblSupplierContactName = new JLabel(" - Name"); lblSupplierContactName.setBounds(15, 425, 100, 15); frame.getContentPane().add(lblSupplierContactName); JLabel lblSupplierContactTelephone = new JLabel(" - Telephone"); lblSupplierContactTelephone.setBounds(15, 445, 100, 15); frame.getContentPane().add(lblSupplierContactTelephone); JLabel lblSupplierContactEmail = new JLabel(" - eMail"); lblSupplierContactEmail.setBounds(15, 465, 100, 15); frame.getContentPane().add(lblSupplierContactEmail); // Payment Means JLabel lblPaymentMeansHeader = new JLabel("------ PAYMENT MEANS (Optional) -----------------------"); lblPaymentMeansHeader.setForeground(Color.RED); lblPaymentMeansHeader.setBounds(410, 350, 350, 15); frame.getContentPane().add(lblPaymentMeansHeader); // JLabel lblPaymentMeans = new JLabel("Payment Means"); lblPaymentMeans.setBounds(410, 375, 100, 15); frame.getContentPane().add(lblPaymentMeans); // JLabel lblPaymentMeansName = new JLabel("Payee Name"); lblPaymentMeansName.setBounds(410, 400, 100, 15); frame.getContentPane().add(lblPaymentMeansName); // JLabel lblPaymentMeansAccount = new JLabel("Account"); lblPaymentMeansAccount.setBounds(410, 425, 100, 15); frame.getContentPane().add(lblPaymentMeansAccount); // Create the Combo Boxes JComboBox APNorth = new JComboBox(); APNorth.addItem(" "); APNorth.addItem("ACME Corporation"); APNorth.addItem("AUSSIE-CORP"); APNorth.addItem("Henrys Bakery"); APNorth.addItem("WKG-North-Inbound"); APNorth.setBounds(170, 15, 150, 18); frame.add(APNorth); JComboBox APSouth = new JComboBox(); APSouth.addItem(" "); APSouth.addItem("Aussie Foods Ltd"); APSouth.addItem("Layer Security Test1"); APSouth.addItem("Layer Security Test2"); APSouth.addItem("MBIE"); APSouth.addItem("Roswell Robotics"); APSouth.addItem("Kingsman Taylors"); APSouth.addItem("WKG-South-Inbound"); APSouth.setBounds(570, 15, 150, 18); frame.add(APSouth); // Define Participants based on selection // AP North APNorth.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent arg0) { String sNorthParticipantID = String.valueOf(arg0.getItem()); if (sNorthParticipantID.equals(" ")) { SenderSchemeID.setText(" "); SenderNZBN.setText(" "); SupplierName.setText(" "); SupplierAddress1.setText(" "); SupplierAddress2.setText(" "); SupplierCity.setText(" "); SupplierPostcode.setText(" "); SupplierCountryCode.setText(" "); SupplierTaxIdentifier.setText(" "); } if (sNorthParticipantID.equals("ACME Corporation")) { SenderSchemeID.setText("0088"); SenderNZBN.setText("9429050728848"); SupplierName.setText("ACME Corporation"); SupplierAddress1.setText("1 Roadrunner Road"); SupplierAddress2.setText("The Square"); SupplierCity.setText("Palmerston North"); SupplierPostcode.setText("1234"); SupplierCountryCode.setText("NZ"); SupplierTaxIdentifier.setText("111-111-111"); } if (sNorthParticipantID.equals("AUSSIE-CORP")) { SenderSchemeID.setText("0151"); SenderNZBN.setText("80007079567"); SupplierName.setText("AUSSIE-CORP"); SupplierAddress1.setText("Shop 55"); SupplierAddress2.setText("100 Military Road"); SupplierCity.setText("Neutral Bay"); SupplierPostcode.setText("NSW 2089"); SupplierCountryCode.setText("AU"); SupplierTaxIdentifier.setText("80007079567"); } if (sNorthParticipantID.equals("Henrys Bakery")) { SenderSchemeID.setText("0088"); SenderNZBN.setText("9429041742723"); SupplierName.setText("Henrys Bakery"); SupplierAddress1.setText("100 Queen Street"); SupplierAddress2.setText("Wynyard Quarter"); SupplierCity.setText("Auckland"); SupplierPostcode.setText("1010"); SupplierCountryCode.setText("NZ"); SupplierTaxIdentifier.setText("222-222-222"); } if (sNorthParticipantID.equals("WKG-North-Inbound")) { SenderSchemeID.setText("0088"); SenderNZBN.setText("9429039349149"); SupplierName.setText("WKG-North-Inbound"); SupplierAddress1.setText("Inbound House"); SupplierAddress2.setText("123 Great North Road"); SupplierCity.setText("Auckland"); SupplierPostcode.setText("3333"); SupplierCountryCode.setText("NZ"); SupplierTaxIdentifier.setText("333-333-333"); } System.out.println("participant = " + sNorthParticipantID); } }); // AP South APSouth.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent arg0) { String sSouthParticipantID = String.valueOf(arg0.getItem()); System.out.println("participant = " + sSouthParticipantID); if (sSouthParticipantID.equals(" ")) { ReceiverSchemeID.setText(" "); ReceiverNZBN.setText(" "); CustomerName.setText(" "); CustomerAddress1.setText(" "); CustomerAddress2.setText(" "); CustomerCity.setText(" "); CustomerPostcode.setText(" "); CustomerCountryCode.setText(" "); } if (sSouthParticipantID.equals("Aussie Foods Ltd")) { ReceiverSchemeID.setText("0151"); ReceiverNZBN.setText("23093952606"); CustomerName.setText("Aussie Foods Ltd"); CustomerAddress1.setText("100 Tobrook Road"); CustomerAddress2.setText("South Yara"); CustomerCity.setText("Melbourne"); CustomerPostcode.setText("VIC 3141"); CustomerCountryCode.setText("AU"); } if (sSouthParticipantID.equals("Layer Security Test1")) { ReceiverSchemeID.setText("0151"); ReceiverNZBN.setText("99111222333"); CustomerName.setText("Rick Harvey"); CustomerAddress1.setText("Test Instance1"); CustomerAddress2.setText("layersecurity.com"); CustomerCity.setText("Melbourne"); CustomerPostcode.setText("VIC 3333"); CustomerCountryCode.setText("AU"); } if (sSouthParticipantID.equals("Layer Security Test2")) { ReceiverSchemeID.setText("0151"); ReceiverNZBN.setText("99100100100"); CustomerName.setText("Rick Harvey"); CustomerAddress1.setText("Test Instance2"); CustomerAddress2.setText("layersecurity.com"); CustomerCity.setText("Melbourne"); CustomerPostcode.setText("VIC 3333"); CustomerCountryCode.setText("AU"); } if (sSouthParticipantID.equals("MBIE")) { ReceiverSchemeID.setText("0088"); ReceiverNZBN.setText("9429050837823"); CustomerName.setText("MBIE"); CustomerAddress1.setText("Level 8"); CustomerAddress2.setText("5 Stout Street"); CustomerCity.setText("Wellington Central"); CustomerPostcode.setText("6011"); CustomerCountryCode.setText("NZ"); } if (sSouthParticipantID.equals("Roswell Robotics")) { ReceiverSchemeID.setText("0088"); ReceiverNZBN.setText("9429034362778"); CustomerName.setText("Roswell Robotics"); CustomerAddress1.setText("Hangar 18"); CustomerAddress2.setText("Area 51"); CustomerCity.setText("Roswell"); CustomerPostcode.setText("1947"); CustomerCountryCode.setText("NZ"); } if (sSouthParticipantID.equals("Kingsman Taylors")) { ReceiverSchemeID.setText("0088"); ReceiverNZBN.setText("9429049760224"); CustomerName.setText("Kingsman Taylors"); CustomerAddress1.setText("11 Saville Row"); CustomerAddress2.setText("Raumati Beach"); CustomerCity.setText("Paraparumu"); CustomerPostcode.setText("5510"); CustomerCountryCode.setText("NZ"); } if (sSouthParticipantID.equals("WKG-South-Inbound")) { ReceiverSchemeID.setText("0007"); ReceiverNZBN.setText("5567125082"); CustomerName.setText("WKG-South-Inbound"); CustomerAddress1.setText("QualIT House Level 3"); CustomerAddress2.setText("3/22 The Terrace"); CustomerCity.setText("Wellington Central"); CustomerPostcode.setText("6012"); CustomerCountryCode.setText("NZ"); } } }); // TAX SCHEME JComboBox TaxScheme = new JComboBox(); TaxScheme.addItem("NZD GST 15%"); TaxScheme.addItem("AUS GST 10%"); TaxScheme.addItem("NZD Exempt 0%"); TaxScheme.addItem("AUS Exempt 0%"); TaxScheme.setBounds(970, 50, 175, 18); frame.add(TaxScheme); // Add listener TaxScheme.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent arg0) { String sTaxScheme = String.valueOf(arg0.getItem()); if (sTaxScheme.equals("NZD GST 15%")) { sCurrencyID = "NZD"; sTaxCategoryID = "S"; sPercent4 = "15"; } if (sTaxScheme.equals("AUS GST 10%")) { sCurrencyID = "AUD"; sTaxCategoryID = "S"; sPercent4 = "10"; } if (sTaxScheme.equals("NZD Exempt 0%")) { sCurrencyID = "NZD"; sTaxCategoryID = "E"; sPercent4 = "0"; } if (sTaxScheme.equals("AUS Exempt 0%")) { sCurrencyID = "AUD"; sTaxCategoryID = "E"; sPercent4 = "0"; } //Debug System.out.println("Line 469 TaxScheme = " + sTaxScheme); System.out.println("Line 470 sCurrencyID = " + sCurrencyID); } }); // Combo Box for Unit Code // TAX SCHEME JComboBox UnitCode = new JComboBox(); UnitCode.addItem("C62 - Standard Unit"); UnitCode.addItem("KGM - Kilograms"); UnitCode.addItem("MIN - Number of Minutes"); UnitCode.addItem("DAY - Number of Days"); UnitCode.setBounds(970, 70, 175, 18); frame.add(UnitCode); // Add listener UnitCode.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent arg0) { String sSelectedUnitCode = String.valueOf(arg0.getItem()); sUnitCode = sSelectedUnitCode.substring(0,3); //Debug // System.out.println("Line 516 sUnitCode = " + sUnitCode); } }); // Payment Means JComboBox PaymentMeans = new JComboBox(); PaymentMeans.addItem(" "); PaymentMeans.addItem("Credit Transfer"); PaymentMeans.addItem("Direct Debit"); PaymentMeans.addItem("Online Payment Service"); PaymentMeans.setBounds(530, 375, 160, 18); frame.add(PaymentMeans); // Determine Payment Means Code based on selection PaymentMeans.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent arg0) { String sPaymentMeans = String.valueOf(arg0.getItem()); //Debug String sRandomBankAccountNumber; Random r1 = new Random(); int x1 = r1.nextInt(10); sRandomBankAccountNumber = "0" + String.valueOf(x1); Random r2 = new Random(); int x2 = 1000 + r2.nextInt(9000); String s2 = String.valueOf(x2); sRandomBankAccountNumber = sRandomBankAccountNumber + "-" + s2; Random r3 = new Random(); int x3 = 10000 + r3.nextInt(90000); String s3 = String.valueOf(x3); sRandomBankAccountNumber = sRandomBankAccountNumber + "-" + s3; Random r4 = new Random(); int x4= 10000 + r4.nextInt(90000); String s4 = String.valueOf(x4); sRandomBankAccountNumber = sRandomBankAccountNumber + s4; // Get Payment Means Code if (sPaymentMeans.equals("Credit Transfer")) { // set the payee name to the supplier name String sSupplierName = SupplierName.getText(); PaymentMeansName.setText(sSupplierName); PaymentMeansAccount.setText(sRandomBankAccountNumber); sPaymentMeansCode = "30"; } if (sPaymentMeans.equals("Direct Debit")) { // set the payee name to the supplier name String sSupplierName = SupplierName.getText(); PaymentMeansName.setText(sSupplierName); PaymentMeansAccount.setText(sRandomBankAccountNumber); sPaymentMeansCode = "49"; } if (sPaymentMeans.equals("Online Payment Service")) { // set the payee name to the supplier name String sSupplierName = "www.onlinepayments.com"; PaymentMeansName.setText(sSupplierName); PaymentMeansAccount.setText(sRandomBankAccountNumber); sPaymentMeansCode = "68"; } } }); // Create Radio Buttons JRadioButton payloadButton = new JRadioButton("Create Payload only"); payloadButton.setSelected(true); JRadioButton fullN2SButton = new JRadioButton("SDBH Invoice North to South"); JRadioButton fullS2NButton = new JRadioButton("SDBH Invoice South to North"); payloadButton.setBounds(800, 550, 200, 15); frame.getContentPane().add(payloadButton); fullN2SButton.setBounds(800, 565, 200, 15); frame.getContentPane().add(fullN2SButton); fullS2NButton.setBounds(800, 580, 200, 15); frame.getContentPane().add(fullS2NButton); //Group the radio buttons (so only 1 can be selected at a time) ButtonGroup group = new ButtonGroup(); group.add(payloadButton); group.add(fullN2SButton); group.add(fullS2NButton); // Listeners to determine which button has been selected // sMODE is a string which is used to determine which XML is created payloadButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent event) { sMODE = "sPAYLOAD"; } }); fullN2SButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent event) { sMODE = "sFULLN2S"; } }); fullS2NButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent event) { sMODE = "sFULLS2N"; } }); ////////////////////////////////////////////////////// // CREATE XML // // Create Button to form the XML on clicking // ////////////////////////////////////////////////////// JButton btnCreateXML = new JButton("Generate XML"); btnCreateXML.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { // get input String messageText = CustomerName.getText(); XMLFile.create(); JOptionPane.showMessageDialog(null, "XML Generated for " + messageText + "'s invoice" ); } }); // Display the Create XML button btnCreateXML.setBounds(500, 550, 200, 45); frame.getContentPane().add(btnCreateXML); ////////////////////////////////////////////////////// // CALCULATIONS (CALCULATE BUTTON) // ////////////////////////////////////////////////////// // Calculate Button to create the line totals on clicking JButton btnCalculateLineExtensionAmounts = new JButton("Calculate"); btnCalculateLineExtensionAmounts.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { // Set Price Amounts // priceAmount = baseAmount - discount // Initialize Null fields to Zero String baseAmount1 = BaseAmount1.getText(); if(baseAmount1.isEmpty()) { baseAmount1 = "0.00"; } String baseAmount2 = BaseAmount2.getText(); if(baseAmount2.isEmpty()) { baseAmount2 = "0.00"; } String baseAmount3 = BaseAmount3.getText(); if(baseAmount3.isEmpty()) { baseAmount3 = "0.00"; } // Validate base amounts // Round to 6 decimal places // After Rounding write the rounded values back to the screen double nBaseAmount1 = 0.00; try { nBaseAmount1 = Double.parseDouble(baseAmount1); nBaseAmount1 = (Math.round(nBaseAmount1 * 1000000.0))/1000000.0; String sBaseAmount1 = Double.toString(nBaseAmount1); BaseAmount1.setText(sBaseAmount1); } catch (NumberFormatException e) { JOptionPane.showMessageDialog(null, "Warning - BaseAmount1 is not a valid number" ); } double nBaseAmount2 = 0.00; try { nBaseAmount2 = Double.parseDouble(baseAmount2); nBaseAmount2 = (Math.round(nBaseAmount2 * 1000000.0))/1000000.0; String sBaseAmount2 = Double.toString(nBaseAmount2); BaseAmount2.setText(sBaseAmount2); } catch (NumberFormatException e) { JOptionPane.showMessageDialog(null, "Warning - BaseAmount2 is not a valid number" ); } double nBaseAmount3 = 0.00; try { nBaseAmount3 = Double.parseDouble(baseAmount3); nBaseAmount3 = (Math.round(nBaseAmount3 * 1000000.0))/1000000.0; String sBaseAmount3 = Double.toString(nBaseAmount3); BaseAmount3.setText(sBaseAmount3); } catch (NumberFormatException e) { JOptionPane.showMessageDialog(null, "Warning - BaseAmount3 is not a valid number" ); } // Get and Validate discount String discount1 = Discount1.getText(); if(discount1.isEmpty()) { discount1 = "0.00"; } String discount2 = Discount2.getText(); if(discount2.isEmpty()) { discount2 = "0.00"; } String discount3 = Discount3.getText(); if(discount3.isEmpty()) { discount3 = "0.00"; } double nDiscount1 = 0.00; try { nDiscount1 = Double.parseDouble(discount1); nDiscount1 = (Math.round(nDiscount1 * 1000000.0))/1000000.0; String sDiscount1 = Double.toString(nDiscount1); Discount1.setText(sDiscount1); } catch (NumberFormatException e) { JOptionPane.showMessageDialog(null, "Warning - Discount1 is not a valid number" ); } double nDiscount2 = 0.00; try { nDiscount2 = Double.parseDouble(discount2); nDiscount2 = (Math.round(nDiscount2 * 1000000.0))/1000000.0; String sDiscount2 = Double.toString(nDiscount2); Discount2.setText(sDiscount2); } catch (NumberFormatException e) { JOptionPane.showMessageDialog(null, "Warning - Discount2 is not a valid number" ); } double nDiscount3 = 0.00; try { nDiscount3 = Double.parseDouble(discount3); nDiscount3 = (Math.round(nDiscount3 * 1000000.0))/1000000.0; String sDiscount3 = Double.toString(nDiscount3); Discount3.setText(sDiscount3); } catch (NumberFormatException e) { JOptionPane.showMessageDialog(null, "Warning - Discount3 is not a valid number" ); } // Warning if no Buyer Reference or Purchase Order Reference String sReferenceCheck = BuyerReference.getText() + POReference.getText(); if(sReferenceCheck.isEmpty()) { JOptionPane.showMessageDialog(null, "Warning - One of Buyer Reference OR Purchase Order Reference is mandatory" ); } // Calculate Item Price after discount double nPriceAmount1 = nBaseAmount1 - nDiscount1; double nPriceAmount2 = nBaseAmount2 - nDiscount2; double nPriceAmount3 = nBaseAmount3 - nDiscount3; // Do some high level rounding to 6 decimal places nPriceAmount1 = (Math.round(nPriceAmount1 * 1000000.0))/1000000.0; nPriceAmount2 = (Math.round(nPriceAmount2 * 1000000.0))/1000000.0; nPriceAmount3 = (Math.round(nPriceAmount3 * 1000000.0))/1000000.0; String sPriceAmount1 = Double.toString(nPriceAmount1); String sPriceAmount2 = Double.toString(nPriceAmount2); String sPriceAmount3 = Double.toString(nPriceAmount3); // Debug System.out.println("sPriceAmount1 = " + sPriceAmount1); System.out.println("sPriceAmount2 = " + sPriceAmount2); System.out.println("sPriceAmount3 = " + sPriceAmount3); // Validate Quantity - then calculate Line Extension Amount String quantity1 = Quantity1.getText(); if(quantity1.isEmpty()) { quantity1 = "0"; } String quantity2 = Quantity2.getText(); if(quantity2.isEmpty()) { quantity2 = "0"; } String quantity3 = Quantity3.getText(); if(quantity3.isEmpty()) { quantity3 = "0"; } double nQuantity1 = 0.00; try { nQuantity1 = Double.parseDouble(quantity1); } catch (NumberFormatException e) { JOptionPane.showMessageDialog(null, "Warning - Quantity1 is not a valid number" ); } double nQuantity2 = 0.00; try { nQuantity2 = Double.parseDouble(quantity2); } catch (NumberFormatException e) { JOptionPane.showMessageDialog(null, "Warning - Quantity2 is not a valid number" ); } double nQuantity3 = 0.00; try { nQuantity3 = Double.parseDouble(quantity3); } catch (NumberFormatException e) { JOptionPane.showMessageDialog(null, "Warning - Quantity3 is not a valid number" ); } // Get and validate the line charges String sLineCharge1 = LineCharge1.getText(); if(sLineCharge1.isEmpty()) { sLineCharge1 = "0"; } String sLineCharge2 = LineCharge2.getText(); if(sLineCharge2.isEmpty()) { sLineCharge2 = "0"; } String sLineCharge3 = LineCharge3.getText(); if(sLineCharge3.isEmpty()) { sLineCharge3 = "0"; } double nLineCharge1 = 0.00; try { nLineCharge1 = Double.parseDouble(sLineCharge1); } catch (NumberFormatException e) { JOptionPane.showMessageDialog(null, "Warning - LineCharge1 is not a valid number" ); } double nLineCharge2 = 0.00; try { nLineCharge2 = Double.parseDouble(sLineCharge2); } catch (NumberFormatException e) { JOptionPane.showMessageDialog(null, "Warning - LineCharge2 is not a valid number" ); } double nLineCharge3 = 0.00; try { nLineCharge3 = Double.parseDouble(sLineCharge3); } catch (NumberFormatException e) { JOptionPane.showMessageDialog(null, "Warning - LineCharge3 is not a valid number" ); } // Debug System.out.println("sLineCharge1 = " + sLineCharge1); System.out.println("sLineCharge2 = " + sLineCharge2); System.out.println("sLineCharge3 = " + sLineCharge3); // Calculate the Line Extension Amount for each line double nLineExtensionAmount1 = (nQuantity1 * nPriceAmount1) + nLineCharge1; double nLineExtensionAmount2 = (nQuantity2 * nPriceAmount2) + nLineCharge2; double nLineExtensionAmount3 = (nQuantity3 * nPriceAmount3) + nLineCharge3; // Line extension amounts should be rounded to 2 decimal places nLineExtensionAmount1 = (Math.round(nLineExtensionAmount1 * 100.0))/100.0; nLineExtensionAmount2 = (Math.round(nLineExtensionAmount2 * 100.0))/100.0; nLineExtensionAmount3 = (Math.round(nLineExtensionAmount3 * 100.0))/100.0; // Use a temporary value just for readability double ntemp = nLineExtensionAmount1 + nLineExtensionAmount2 + nLineExtensionAmount3; double nLineExtensionAmountTotal = (Math.round(ntemp * 100.0))/100.0; // Taxable Amount is the sum of lines + charges - allowances // Invoice Level Allowance / Charge String sInVoiceLevelAllowance = InvoiceLevelAllowance.getText(); if(sInVoiceLevelAllowance.isEmpty()) { sInVoiceLevelAllowance = "0.00"; } String sInVoiceLevelCharge = InvoiceLevelCharge.getText(); if(sInVoiceLevelCharge.isEmpty()) { sInVoiceLevelCharge = "0.00"; } double nInvoiceLevelAllowance = Double.parseDouble(sInVoiceLevelAllowance); double nInvoiceLevelCharge = Double.parseDouble(sInVoiceLevelCharge); String sLineExtensionAmount1 = Double.toString(nLineExtensionAmount1); String sLineExtensionAmount2 = Double.toString(nLineExtensionAmount2); String sLineExtensionAmount3 = Double.toString(nLineExtensionAmount3); String sLineExtensionAmountTotal = Double.toString(nLineExtensionAmountTotal); // Debug System.out.println("sLineExtensionAmount1 = " + sLineExtensionAmount1); System.out.println("sLineExtensionAmount2 = " + sLineExtensionAmount2); System.out.println("sLineExtensionAmount3 = " + sLineExtensionAmount3); //////////////////////////////////////////////////////// // Tax - Get the tax rates from the screen // //////////////////////////////////////////////////////// // Calculate Taxable Amount Double nTaxableAmount = 0.00; sPercent1 = sPercent4; sPercent2 = sPercent4; sPercent3 = sPercent4; nTaxableAmount = nTaxableAmount + nLineExtensionAmount1 + nLineExtensionAmount2 + nLineExtensionAmount3; // For future enhancement - mixed tax rates //String sTaxRegime1 = TaxCategory1.getText(); //if (sTaxRegime1.equals("NZD GST 15%")) { // sCurrencyID = "NZD"; // sPercent1 = "15"; // nTaxableAmount = nTaxableAmount + nLineExtensionAmount1; //} //if (sTaxRegime1.equals("AUS GST 10%")) { // sCurrencyID = "AUD"; // sPercent1 = "10"; // nTaxableAmount = nTaxableAmount + nLineExtensionAmount1; //} //if (sTaxRegime1.equals("NZD Exempt 0%")) { // sCurrencyID = "NZD"; // sPercent1 = "0"; //} //if (sTaxRegime1.equals("AUS Exempt 0%")) { // sCurrencyID = "AUD"; // sPercent1 = "0"; //} //String sTaxRegime2 = TaxCategory2.getText(); //if (sTaxRegime2.equals("NZD GST 15%")) { // sCurrencyID = "NZD"; // sPercent2 = "15"; // nTaxableAmount = nTaxableAmount + nLineExtensionAmount2; //} //if (sTaxRegime2.equals("AUS GST 10%")) { // sCurrencyID = "AUD"; // sPercent2 = "10"; // nTaxableAmount = nTaxableAmount + nLineExtensionAmount2; //} //if (sTaxRegime2.equals("NZD Exempt 0%")) { // sCurrencyID = "NZD"; // sPercent2 = "0"; //} //if (sTaxRegime2.equals("AUS Exempt 0%")) { // sCurrencyID = "AUD"; // sPercent2 = "0"; //} //String sTaxRegime3 = TaxCategory3.getText(); //if (sTaxRegime3.equals("NZD GST 15%")) { // sCurrencyID = "NZD"; // sPercent3 = "15"; // nTaxableAmount = nTaxableAmount + nLineExtensionAmount3; //} //if (sTaxRegime3.equals("AUS GST 10%")) { // sCurrencyID = "AUD"; // sPercent3 = "10"; // nTaxableAmount = nTaxableAmount + nLineExtensionAmount3; //} //if (sTaxRegime3.equals("NZD Exempt 0%")) { // sCurrencyID = "NZD"; // sPercent3 = "0"; //} //if (sTaxRegime3.equals("AUS Exempt 0%")) { // sCurrencyID = "AUD"; // sPercent3 = "0"; //} // Default the Invoice Level Charges/Allowance to the drop down Double nTaxRate4 = Double.parseDouble(sPercent4); nTaxableAmount = nTaxableAmount + nInvoiceLevelCharge - nInvoiceLevelAllowance; // debug System.out.println(" line 995 : Taxable Amount = " + nTaxableAmount + " " + nInvoiceLevelCharge + " " + nInvoiceLevelAllowance); nTaxableAmount = (Math.round(nTaxableAmount * 100.0))/100.0; String sTaxableAmount = Double.toString(nTaxableAmount); double nTaxAmount = (Math.round(nTaxRate4 * nTaxableAmount))/100.0; String sTaxAmount = Double.toString(nTaxAmount); Double nTaxExclusiveAmount = (Math.round(nTaxableAmount * 100.0))/100.0; Double nTaxInclusiveAmount = (Math.round((nTaxableAmount + nTaxAmount) * 100.0))/100.0; String sTaxExclusiveAmount = Double.toString(nTaxExclusiveAmount); String sTaxInclusiveAmount = Double.toString(nTaxInclusiveAmount); // Document Level Allowance / Charge must be rounded to 2 decimal places nInvoiceLevelAllowance = (Math.round((nInvoiceLevelAllowance) * 100.0))/100.0; nInvoiceLevelCharge = (Math.round((nInvoiceLevelCharge) * 100.0))/100.0; // double nAllowanceTotalAmount = 0.00; // double nChargeTotalAmount = nAllowanceCharge; // String sInvoiceLevelAllowance = Double.toString(nInvoiceLevelAllowance); String sInvoiceLevelCharge = Double.toString(nInvoiceLevelCharge); // String sAllowanceTotalAmount = Double.toString(nAllowanceTotalAmount); // String sChargeTotalAmount = Double.toString(nChargeTotalAmount); double nPayableAmount = (Math.round((nTaxInclusiveAmount) * 100.0))/100.0; String sPayableAmount = Double.toString(nPayableAmount); //////////////////////////////////////////////////////// /// Now set the calculated values back to the screen /// /// This should also include rounded values /// //////////////////////////////////////////////////////// PriceAmount1.setText(sPriceAmount1); PriceAmount2.setText(sPriceAmount2); PriceAmount3.setText(sPriceAmount3); LineExtensionAmount1.setText(sLineExtensionAmount1); LineExtensionAmount2.setText(sLineExtensionAmount2); LineExtensionAmount3.setText(sLineExtensionAmount3); LineExtensionAmountTotal.setText(sLineExtensionAmountTotal); TaxableAmount.setText(sTaxableAmount); TaxAmount.setText(sTaxAmount); TaxExclusiveAmount.setText(sTaxExclusiveAmount); TaxInclusiveAmount.setText(sTaxInclusiveAmount); // AllowanceTotalAmount.setText(sAllowanceTotalAmount); // ChargeTotalAmount.setText(sChargeTotalAmount); AllowanceTotalAmount.setText(sInvoiceLevelAllowance); ChargeTotalAmount.setText(sInvoiceLevelCharge); PayableAmount.setText(sPayableAmount); JOptionPane.showMessageDialog(null, "Invoice totals successfully calculated" ); } }); // Set the position of the Calculate button btnCalculateLineExtensionAmounts.setBounds(685, 240, 100, 45); frame.getContentPane().add(btnCalculateLineExtensionAmounts); ////////////////////////////////////////////////////////////////// // // // ALL INPUT TEXT BOXES HERE // // // ////////////////////////////////////////////////////////////////// SenderSchemeID = new JTextField(); SenderSchemeID.setBounds(170, 35, 40, 15); frame.getContentPane().add(SenderSchemeID); SenderNZBN = new JTextField(); SenderNZBN.setBounds(215, 35, 105, 15); frame.getContentPane().add(SenderNZBN); ReceiverSchemeID = new JTextField(); ReceiverSchemeID.setBounds(570, 35, 40, 15); frame.getContentPane().add(ReceiverSchemeID); ReceiverNZBN = new JTextField(); ReceiverNZBN.setBounds(615, 35, 105, 15); frame.getContentPane().add(ReceiverNZBN); // Supplier Input fields - adding 15 to 2nd each time SupplierName = new JTextField(); SupplierName.setBounds(170, 65, 150, 15); frame.getContentPane().add(SupplierName); SupplierAddress1 = new JTextField(); SupplierAddress1.setBounds(170, 80, 150, 15); frame.getContentPane().add(SupplierAddress1); SupplierAddress2 = new JTextField(); SupplierAddress2.setBounds(170, 95, 150, 15); frame.getContentPane().add(SupplierAddress2); SupplierCity = new JTextField(); SupplierCity.setBounds(170, 110, 150, 15); frame.getContentPane().add(SupplierCity); SupplierPostcode = new JTextField(); SupplierPostcode.setBounds(170, 125, 150, 15); frame.getContentPane().add(SupplierPostcode); SupplierCountryCode = new JTextField(); SupplierCountryCode.setBounds(170, 140, 50, 15); frame.getContentPane().add(SupplierCountryCode); // Customer Input Fields CustomerName = new JTextField(); CustomerName.setBounds(570, 65, 150, 15); frame.getContentPane().add(CustomerName); CustomerAddress1 = new JTextField(); CustomerAddress1.setBounds(570, 80, 150, 15); frame.getContentPane().add(CustomerAddress1); CustomerAddress2 = new JTextField(); CustomerAddress2.setBounds(570, 95, 150, 15); frame.getContentPane().add(CustomerAddress2); CustomerCity = new JTextField(); CustomerCity.setBounds(570, 110, 150, 15); frame.getContentPane().add(CustomerCity); CustomerPostcode = new JTextField(); CustomerPostcode.setBounds(570, 125, 150, 15); frame.getContentPane().add(CustomerPostcode); CustomerCountryCode = new JTextField(); CustomerCountryCode.setBounds(570, 140, 50, 15); frame.getContentPane().add(CustomerCountryCode); // Mandatory for XML // Buyer Reference & Purchase Order Reference BuyerReference = new JTextField(); BuyerReference.setBounds(970, 15, 150, 15); frame.getContentPane().add(BuyerReference); POReference = new JTextField(); POReference.setBounds(970, 30, 150, 15); frame.getContentPane().add(POReference); // Invoice charge/allowance reason InvoiceLineChargeReason = new JTextField(); InvoiceLineChargeReason.setBounds(970, 100, 150, 15); frame.getContentPane().add(InvoiceLineChargeReason); InvoiceLineChargeReason.setText(sAllowanceChargeReason); // Invoice Lines: GoodsDescription1 = new JTextField(); GoodsDescription1.setBounds(15,240,305,15); frame.getContentPane().add(GoodsDescription1); GoodsDescription2 = new JTextField(); GoodsDescription2.setBounds(15,255,305,15); frame.getContentPane().add(GoodsDescription2); GoodsDescription3 = new JTextField(); GoodsDescription3.setBounds(15,270,305,15); frame.getContentPane().add(GoodsDescription3); // Quantity Quantity1 = new JTextField(); Quantity1.setBounds(325,240,80,15); frame.getContentPane().add(Quantity1); Quantity2 = new JTextField(); Quantity2.setBounds(325,255,80,15); frame.getContentPane().add(Quantity2); Quantity3 = new JTextField(); Quantity3.setBounds(325,270,80,15); frame.getContentPane().add(Quantity3); // Base Amount BaseAmount1 = new JTextField(); BaseAmount1.setBounds(410,240,80,15); frame.getContentPane().add(BaseAmount1); BaseAmount2 = new JTextField(); BaseAmount2.setBounds(410,255,80,15); frame.getContentPane().add(BaseAmount2); BaseAmount3 = new JTextField(); BaseAmount3.setBounds(410,270,80,15); frame.getContentPane().add(BaseAmount3); // AllowanceCharge AllowanceChargeDescription = new JTextField(); AllowanceChargeDescription.setBounds(15,315,305,15); frame.getContentPane().add(AllowanceChargeDescription); // enhancement 30/11/2020 // split allowance/charge InvoiceLevelAllowance = new JTextField(); InvoiceLevelAllowance.setBounds(325,315,80,15); frame.getContentPane().add(InvoiceLevelAllowance); // InvoiceLevelCharge = new JTextField(); InvoiceLevelCharge.setBounds(410,315,80,15); frame.getContentPane().add(InvoiceLevelCharge); // Discount (item level - adjustment to price) Discount1 = new JTextField(); Discount1.setBounds(495,240,80,15); frame.getContentPane().add(Discount1); Discount2 = new JTextField(); Discount2.setBounds(495,255,80,15); frame.getContentPane().add(Discount2); Discount3 = new JTextField(); Discount3.setBounds(495,270,80,15); frame.getContentPane().add(Discount3); LineCharge1 = new JTextField(); LineCharge1.setBounds(595,240,80,15); frame.getContentPane().add(LineCharge1); LineCharge2 = new JTextField(); LineCharge2.setBounds(595,255,80,15); frame.getContentPane().add(LineCharge2); LineCharge3 = new JTextField(); LineCharge3.setBounds(595,270,80,15); frame.getContentPane().add(LineCharge3); // Calculated Fields - Price Amount PriceAmount1 = new JTextField(); PriceAmount1.setBounds(800,240,100,15); PriceAmount1.setText("CALCULATED"); frame.getContentPane().add(PriceAmount1); PriceAmount2 = new JTextField(); PriceAmount2.setBounds(800,255,100,15); PriceAmount2.setText("CALCULATED"); frame.getContentPane().add(PriceAmount2); PriceAmount3 = new JTextField(); PriceAmount3.setBounds(800,270,100,15); PriceAmount3.setText("CALCULATED"); frame.getContentPane().add(PriceAmount3); // Calculated Fields - Line Extension Amount LineExtensionAmount1 = new JTextField(); LineExtensionAmount1.setBounds(920,240,100,15); LineExtensionAmount1.setText("CALCULATED"); frame.getContentPane().add(LineExtensionAmount1); LineExtensionAmount2 = new JTextField(); LineExtensionAmount2.setBounds(920,255,100,15); LineExtensionAmount2.setText("CALCULATED"); frame.getContentPane().add(LineExtensionAmount2); LineExtensionAmount3 = new JTextField(); LineExtensionAmount3.setBounds(920,270,100,15); LineExtensionAmount3.setText("CALCULATED"); frame.getContentPane().add(LineExtensionAmount3); LineExtensionAmountTotal = new JTextField(); LineExtensionAmountTotal.setBounds(920,300,100,15); LineExtensionAmountTotal.setText("CALCULATED"); frame.getContentPane().add(LineExtensionAmountTotal); // Calculated Fields - Tax TaxableAmount = new JTextField(); TaxableAmount.setBounds(920,320,100,15); TaxableAmount.setText("CALCULATED"); frame.getContentPane().add(TaxableAmount); TaxAmount = new JTextField(); TaxAmount.setBounds(920,340,100,15); TaxAmount.setText("CALCULATED"); frame.getContentPane().add(TaxAmount); TaxExclusiveAmount = new JTextField(); TaxExclusiveAmount.setBounds(920,360,100,15); TaxExclusiveAmount.setText("CALCULATED"); frame.getContentPane().add(TaxExclusiveAmount); TaxInclusiveAmount = new JTextField(); TaxInclusiveAmount.setBounds(920,380,100,15); TaxInclusiveAmount.setText("CALCULATED"); frame.getContentPane().add(TaxInclusiveAmount); AllowanceTotalAmount = new JTextField(); AllowanceTotalAmount.setBounds(920,400,100,15); AllowanceTotalAmount.setText("CALCULATED"); frame.getContentPane().add(AllowanceTotalAmount); ChargeTotalAmount = new JTextField(); ChargeTotalAmount.setBounds(920,420,100,15); ChargeTotalAmount.setText("CALCULATED"); frame.getContentPane().add(ChargeTotalAmount); PayableAmount = new JTextField(); PayableAmount.setBounds(920,440,100,15); PayableAmount.setText("CALCULATED"); frame.getContentPane().add(PayableAmount); // *** Optional Fields *** // Invoice Due Date - set default date today + 30 days InvoiceDueDate = new JTextField(); InvoiceDueDate.setBounds(970,120,100,15); // Get date as string LocalDate today = LocalDate.now(); LocalDate dueDate = today.plusDays(30); String sDefaultDueDate = dueDate.toString(); InvoiceDueDate.setText(sDefaultDueDate); frame.getContentPane().add(InvoiceDueDate); // Supplier Tax Identifier SupplierTaxIdentifier = new JTextField(); SupplierTaxIdentifier.setBounds(170,375,150,15); frame.getContentPane().add(SupplierTaxIdentifier); // Supplier Contact Details SupplierContactName = new JTextField(); SupplierContactName.setBounds(170,425,150,15); frame.getContentPane().add(SupplierContactName); // SupplierContactTelephone = new JTextField(); SupplierContactTelephone.setBounds(170,445,150,15); frame.getContentPane().add(SupplierContactTelephone); // SupplierContactEmail = new JTextField(); SupplierContactEmail.setBounds(170,465,150,15); frame.getContentPane().add(SupplierContactEmail); PaymentMeansName = new JTextField(); PaymentMeansName.setBounds(530, 400, 150, 15); frame.getContentPane().add(PaymentMeansName); PaymentMeansAccount = new JTextField(); PaymentMeansAccount.setBounds(530, 425, 150, 15); frame.getContentPane().add(PaymentMeansAccount); } }
package sample; import com.jfoenix.controls.JFXButton; import javafx.application.Application; import javafx.beans.value.ChangeListener; import javafx.beans.value.ObservableValue; import javafx.fxml.FXMLLoader; import javafx.geometry.Insets; import javafx.geometry.Orientation; import javafx.geometry.Pos; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.scene.control.*; import javafx.scene.control.Button; import javafx.scene.control.Label; import javafx.scene.control.TextField; import javafx.scene.image.Image; import javafx.scene.image.ImageView; import javafx.scene.input.MouseButton; import javafx.scene.layout.*; import javafx.stage.Stage; import java.awt.*; import java.awt.event.MouseEvent; import java.util.ArrayList; public class Main extends Application { Stage window; Scene gridScene, startScene; int height = 0; int width = 0; String player; String Player2NameString; String themeLight ; String themeDark ; boolean themeSelector = false; ScoreBoard sb =new ScoreBoard(); //Test Only chooseLoadedGame load = new chooseLoadedGame(); GUIGame guiGame; settingsGUI settings = new settingsGUI(); startNewGameSettings startmenu = new startNewGameSettings(); //Gui Elements for theme HBox gameStartPane = new HBox(); VBox gameOpeneingList = new VBox(); ImageView imageView = new ImageView(); public int blankCell = 1 ; public int flagCell = 5 ; public int bombCell = 10 ; public int shieldsCount = 0 ; public static String themePath = "./style.css" ; @Override public void start(Stage primaryStage) throws Exception { Parent root = FXMLLoader.load(getClass().getResource("sample.fxml")); ////////////////////////////////////////////////////////////////////////////////////////// NEW UI window = primaryStage ; window.setTitle("Mine Sweeper Material"); themeLight = getClass().getResource("../style.css").toExternalForm(); themeDark = getClass().getResource("../DarkStyle.css").toExternalForm(); gameStartPane.getStylesheets().add(themePath); Music music = new Music(); music.start(); Label nameGameLabel = new Label("Mine Sweeper"); nameGameLabel.setAlignment(Pos.CENTER); nameGameLabel.getStyleClass().add("newGameLabels"); nameGameLabel.setId("nameGame"); /////// Label nameGameMatLabel = new Label("*/* Material Version */*"); nameGameLabel.setAlignment(Pos.CENTER); nameGameMatLabel.getStyleClass().add("newGameLabels"); nameGameMatLabel.setId("nameGameMat"); JFXButton newGameButton = new JFXButton("New Game"); newGameButton.getStyleClass().add("button-raised"); newGameButton.setId("openingButtons"); newGameButton.setAlignment(Pos.CENTER); newGameButton.setOnAction(e -> { startmenu.startingGameSettings(themeSelector ); }); JFXButton oldgamesButton = new JFXButton("Load Old Games"); oldgamesButton.getStyleClass().add("button-raised"); oldgamesButton.setId("openingButtons"); oldgamesButton.setAlignment(Pos.CENTER); oldgamesButton.setOnAction(e ->{ load.openLoadList(themeSelector); }); JFXButton ScoreBoardButton = new JFXButton("Score Board"); ScoreBoardButton.getStyleClass().add("button-raised"); ScoreBoardButton.setId("openingButtons"); ScoreBoardButton.setAlignment(Pos.CENTER); ScoreBoardButton.setOnAction(e ->{ sb.GUIScoreBord(themeSelector); }); JFXButton QuickGameButton = new JFXButton("Quick Load Game"); QuickGameButton.getStyleClass().add("button-raised"); QuickGameButton.setId("openingButtons"); QuickGameButton.setAlignment(Pos.CENTER); QuickGameButton.setOnAction(e ->{ window.setScene(guiGame.returnScene(guiGame.grid.getHeight(),guiGame.grid.getWidth(),"ammar","nader", 1100,700,false, settingsGUI.shieldsCount)); }); JFXButton settingsButton = new JFXButton("Settings"); settingsButton.getStyleClass().add("button-raised"); settingsButton.setId("openingButtons"); settingsButton.setAlignment(Pos.CENTER); settingsButton.setOnAction(e -> { settings.openSettingsWindow(this.blankCell, this.flagCell , this.bombCell , this.shieldsCount ); }); gameOpeneingList.setMinWidth(1100/2); gameOpeneingList.setAlignment(Pos.CENTER); VBox.setMargin(newGameButton , new Insets(150 , 20 ,15 ,80)); VBox.setMargin(oldgamesButton , new Insets(15 , 20 ,15 ,80)); VBox.setMargin(ScoreBoardButton , new Insets(15 , 20 ,15 ,80)); VBox.setMargin(QuickGameButton , new Insets(15 , 20 ,15 ,80)); VBox.setMargin(settingsButton , new Insets(15 , 20 ,15 ,80)); VBox.setMargin(nameGameLabel , new Insets(15 , 20 ,15 ,80)); // gameOpeneingList.Insets() gameOpeneingList.getStylesheets().add("./style.css"); gameOpeneingList.getChildren().addAll( nameGameLabel, nameGameMatLabel , newGameButton , QuickGameButton, oldgamesButton, ScoreBoardButton, settingsButton); VBox pictureBox = new VBox(); imageView = new ImageView( new Image("./assests/map.png") ); imageView.getStyleClass().add("mapImage"); pictureBox.getChildren().addAll(imageView); imageView.setPreserveRatio(true); imageView.setFitWidth(450); pictureBox.setAlignment(Pos.CENTER); VBox.setMargin(imageView, new Insets(70)); settings.toggleTheme.selectedProperty().addListener( (v,oldValue,newValue) -> { System.out.println(newValue); if (newValue) { gameStartPane.getStylesheets().remove(themeLight); themeSelector = true ; System.out.println("scene stylesheets on button 1 click: " + gameStartPane.getStylesheets()); if(!gameStartPane.getStylesheets().contains(themeDark)) gameStartPane.getStylesheets().add(themeDark); imageView.setImage(new Image("./assests/mapDark.png")); themeSelector = true; System.out.println("scene stylesheets on button 1 click: " + gameStartPane.getStylesheets()); } else if(!newValue){ gameStartPane.getStylesheets().remove(themeDark); themeSelector = false ; System.out.println("scene stylesheets on button 1 click: " + gameStartPane.getStylesheets()); if(!gameStartPane.getStylesheets().contains(themeLight)) gameStartPane.getStylesheets().add(themeLight); imageView.setImage(new Image("./assests/map.png")); themeSelector = false; System.out.println("scene stylesheets on button 1 click: " + gameStartPane.getStylesheets()); } }); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// gameStartPane.getChildren().addAll(gameOpeneingList , pictureBox); startScene = new Scene(gameStartPane , 1100 , 700); // scenesArray[0] = startScene; window.setScene(startScene); window.show(); window.setOnCloseRequest(e -> music.interrupt()); } public static void main (String[]args){ launch(args); } private boolean isInt (TextField input, String message){ try { int age = Integer.parseInt(input.getText()); System.out.println("User is: " + age); return true; } catch (NumberFormatException e) { System.out.println("Error: " + message + " is not a number"); return false; } } }
package com.nju.edu.cn.controller; import com.alibaba.fastjson.JSON; import com.nju.edu.cn.util.UuidHelper; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.RestController; import java.util.UUID; /** * Created by shea on 2018/7/29. */ @RestController @RequestMapping(value = "/api/gene", produces = "application/json;charset=UTF-8") public class Test { @GetMapping("/uuid") public @ResponseBody String uuid(){ String res = UUID.randomUUID().toString() ; System.out.println(res); return JSON.toJSONString(res); } }
package com.translator.application.test.doubles; import com.translator.application.IntergalacticWorthCalculationProcessor; import com.translator.domain.model.material.Material; import com.translator.domain.model.numeral.RomanNumeral; import java.util.List; import java.util.Map; public class IntergalacticWorthCalculationProcessorSpy extends IntergalacticWorthCalculationProcessor { public List<String> questionsCalledWith; public Map<String, RomanNumeral> intergalacticToRomanCreatedWith; public Map<String, Material> materialsByNameCreatedWith; public IntergalacticWorthCalculationProcessorSpy(Map<String, RomanNumeral> intergalacticToRoman, Map<String, Material> materialsByName) { super(intergalacticToRoman, materialsByName); intergalacticToRomanCreatedWith = intergalacticToRoman; materialsByNameCreatedWith = materialsByName; } @Override public void process(List<String> questions) { questionsCalledWith = questions; } }
package com.pg.whatsstatussaver.Events; import android.graphics.Bitmap; import java.util.ArrayList; public class EventBusClass { public static class ActivityServiceMessage{ private ArrayList<String> images; private ArrayList<Bitmap> bitmaps; public ActivityServiceMessage(ArrayList<String> images, ArrayList<Bitmap> bitmaps) { this.images = images; this.bitmaps = bitmaps; } public ArrayList<String> getImages() { return images; } public void setImages(ArrayList<String> images) { this.images = images; } public ArrayList<Bitmap> getBitmaps() { return bitmaps; } public void setBitmaps(ArrayList<Bitmap> bitmaps) { this.bitmaps = bitmaps; } } }
package snake.tests; import org.junit.Test; import static org.junit.Assert.*; import java.util.*; import java.lang.*; import snake.exception.*; import snake.Game; import snake.Apple; import snake.util.Position; public class ToApplesTest{ @Test(expected = IllegalArgumentException.class) public void testNullParam() { List<String> nullParam = null; List<Apple> outNull = Game.toApples(nullParam); } @Test public void testEmptyList(){ List<String> emptyList = new ArrayList<>(); List<Apple> outEmpty = Game.toApples(emptyList); assertTrue(outEmpty.isEmpty()); } @Test public void testStartsWithSpace(){ List<String> spaceList = new ArrayList<>(); spaceList.add(" 5"); List<Apple> outSpace = Game.toApples(spaceList); assertTrue(outSpace.isEmpty()); } @Test public void testRowNotInt(){ List<String> notIntList = new ArrayList<>(); notIntList.add("rossz 5"); List<Apple> outNotInt = Game.toApples(notIntList); assertTrue(outNotInt.isEmpty()); } @Test public void testColumnNotInt(){ List<String> notIntList = new ArrayList<>(); notIntList.add("5 rossz"); List<Apple> outNotInt = Game.toApples(notIntList); assertTrue(outNotInt.isEmpty()); } @Test public void testRowNegative(){ List<String> negativeRow = new ArrayList<>(); negativeRow.add("-5 5"); List<Apple> outNegative = Game.toApples(negativeRow); assertTrue(outNegative.isEmpty()); } @Test public void testRowUpperLimit(){ List<String> upperLimitList = new ArrayList<>(); upperLimitList.add("10 5"); List<Apple> outLimit = Game.toApples(upperLimitList); assertTrue(outLimit.isEmpty()); } @Test public void testLowerLimit(){ List<String> lowerLimitList = new ArrayList<>(); lowerLimitList.add("0 0"); List<Apple> outLimit = Game.toApples(lowerLimitList); assertTrue(outLimit.size() == 1); } @Test public void testLoopTwiceRun(){ List<String> twiceRun = new ArrayList<>(); twiceRun.add("5 5"); twiceRun.add("6 6"); List<Apple> outRun = Game.toApples(twiceRun); assertTrue(outRun.size() == 2); } @Test public void testLoopRepeatedlyRun(){ List<String> runList = new ArrayList<>(); runList.add("5 5"); runList.add("6 6"); runList.add("7 7"); List<Apple> outRun = Game.toApples(runList); assertTrue(outRun.size() == 3); } }
package com.tiandi.logistics.aop.log.enumeration; /** * 系统类型枚举类,供日志注解使用 * * @author Yue Wu * @version 1.0 * @since 2020/11/30 10:09 */ public enum SysTypeEnum { /** * 用户平台 */ CUSTOMER("客户平台", 0), /** * 配送点平台 */ ADMIN("管理平台",1), /** * 通用方法 */ NORMAL("通用方法",2); private String sysType; private int sysCode; SysTypeEnum(String sysType, int sysCode) { this.sysType = sysType; this.sysCode = sysCode; } public static String getMessage(int sysCode){ //通过enum.values()获取所有的枚举值 for(SysTypeEnum logOperateTypeEnum : SysTypeEnum.values()){ //通过enum.get获取字段值 if(logOperateTypeEnum.getSysCode() == sysCode){ return logOperateTypeEnum.sysType; } } return null; } public String getSysType() { return sysType; } public void setSysType(String sysType) { this.sysType = sysType; } public int getSysCode() { return sysCode; } public void setSysCode(int sysCode) { this.sysCode = sysCode; } }
package com.zilker.taxi.shared; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.logging.Level; import java.util.logging.Logger; import com.zilker.taxi.bean.BookingResponse; import com.zilker.taxi.bean.Profile; import com.zilker.taxi.bean.RideHistory; import com.zilker.taxi.bean.User; import com.zilker.taxi.constant.SQLConstants; import com.zilker.taxi.util.DbConnect; /* * Handles the shared functionalities of a driver/customer/admin. */ public class SharedDAO { private final static Logger LOGGER = Logger.getLogger(Logger.GLOBAL_LOGGER_NAME); /* * Checks if the contact of a user already exists. */ public boolean checkContactExists(String contact) { Connection connection = null; PreparedStatement preparedStatement = null; ResultSet resultSet = null; try { connection = DbConnect.getConnection(); preparedStatement = connection.prepareStatement(SQLConstants.CHECK_CONTACT_EXISTS); preparedStatement.setString(1, contact); resultSet = preparedStatement.executeQuery(); if (resultSet.next()) { return true; } return false; } catch (NumberFormatException ne) { LOGGER.log(Level.WARNING, "Error in parsing details."); return false; } catch (SQLException e) { LOGGER.log(Level.SEVERE, "Error in checking if contact exists from DB."); return false; } finally { DbConnect.closeConnection(connection, preparedStatement, resultSet); } } /* * Creates a user account */ public void createAccount(User user) { Connection connection = null; PreparedStatement preparedStatement = null; ResultSet resultSet = null; try { connection = DbConnect.getConnection(); preparedStatement = connection.prepareStatement(SQLConstants.INSERT_PERSONAL_DETAILS); preparedStatement.setString(1, user.getUserName()); preparedStatement.setString(2, user.getMail()); preparedStatement.setString(3, user.getContact()); preparedStatement.setString(4, user.getRole()); preparedStatement.setString(5, user.getPassword()); preparedStatement.executeUpdate(); } catch (SQLException e) { LOGGER.log(Level.SEVERE, "Error in inserting personal details to DB."); } finally { DbConnect.closeConnection(connection, preparedStatement, resultSet); } } /* * Retrieves the user ID. */ public int getUserID(String contact) { int userID = -1; String test = ""; Connection connection = null; PreparedStatement preparedStatement = null; ResultSet resultSet = null; try { connection = DbConnect.getConnection(); preparedStatement = connection.prepareStatement(SQLConstants.GET_USER_ID); preparedStatement.setString(1, contact); resultSet = preparedStatement.executeQuery(); if (resultSet.next()) { test = resultSet.getString(1); userID = Integer.parseInt(test); } return userID; } catch (NumberFormatException ne) { LOGGER.log(Level.WARNING, "Error in parsing details."); return -1; } catch (SQLException e) { LOGGER.log(Level.SEVERE, "Error in retrieving user ID from DB."); return -1; } finally { DbConnect.closeConnection(connection, preparedStatement, resultSet); } } /* * Updates the update timestamp of customer. */ public void updateAccount(int userID, String contact) { Connection connection = null; PreparedStatement preparedStatement = null; ResultSet resultSet = null; try { connection = DbConnect.getConnection(); preparedStatement = connection.prepareStatement(SQLConstants.UPDATE_USER_ID); preparedStatement.setInt(1, userID); preparedStatement.setInt(2, userID); preparedStatement.setString(3, contact); preparedStatement.executeUpdate(); } catch (SQLException e) { LOGGER.log(Level.SEVERE, "Error in updating user record in DB."); } finally { DbConnect.closeConnection(connection, preparedStatement, resultSet); } } /* * Creates an address record for the customer. */ public void createUserAddress(User user, int userID) { Connection connection = null; PreparedStatement preparedStatement = null; ResultSet resultSet = null; try { connection = DbConnect.getConnection(); preparedStatement = connection.prepareStatement(SQLConstants.INSERT_USER_ADDRESS); preparedStatement.setInt(1, userID); preparedStatement.setString(2, user.getAddress()); preparedStatement.setString(3, user.getCity()); preparedStatement.setString(4, user.getZipCode()); preparedStatement.setInt(5, userID); preparedStatement.setInt(6, userID); preparedStatement.executeUpdate(); } catch (SQLException e) { LOGGER.log(Level.SEVERE, "Error in inserting customer address record into DB."); } finally { DbConnect.closeConnection(connection, preparedStatement, resultSet); } } /* * Login the user. */ public String login(String phone, String password) { String role = ""; Connection connection = null; PreparedStatement preparedStatement = null; ResultSet resultSet = null; try { connection = DbConnect.getConnection(); preparedStatement = connection.prepareStatement(SQLConstants.CHECK_LOGIN); preparedStatement.setString(1, phone); preparedStatement.setString(2, password); resultSet = preparedStatement.executeQuery(); if (resultSet.next()) { role = resultSet.getString(1); } return role; } catch (SQLException e) { LOGGER.log(Level.SEVERE, "Error in validating login credentials from DB."); return role; } finally { DbConnect.closeConnection(connection, preparedStatement, resultSet); } } /* * Displays the customer profile. */ public Profile displayProfile(String userPhone) { String userName = ""; String mail = ""; String contact = ""; String role = ""; String address = ""; String city = ""; String zipCode = ""; Profile profile = null; Connection connection = null; PreparedStatement preparedStatement = null; ResultSet resultSet = null; try { connection = DbConnect.getConnection(); preparedStatement = connection .prepareStatement("SELECT USERNAME, MAIL, CONTACT, ROLE, STREET_ADDRESS, CITY, ZIP_CODE " + "FROM USER_DETAIL, ADDRESS_DETAIL WHERE ADDRESS_DETAIL.USER_ID=USER_DETAIL.USER_ID AND CONTACT=\"" + userPhone + "\""); resultSet = preparedStatement.executeQuery(); while (resultSet.next()) { userName = resultSet.getString(1); mail = resultSet.getString(2); contact = resultSet.getString(3); role = resultSet.getString(4); address = resultSet.getString(5); city = resultSet.getString(6); zipCode = resultSet.getString(7); } profile = new Profile(userName, mail, contact, role, address, city, zipCode); return profile; } catch (SQLException e) { LOGGER.log(Level.SEVERE, "Error in validating login credentials from DB."); return null; } catch (Exception e) { LOGGER.log(Level.WARNING, "Error in retrieving profile details from the DB."); return null; } finally { DbConnect.closeConnection(connection, preparedStatement, resultSet); } } /* * Displays the ride details of a customer. */ public BookingResponse displayBookingDetails(int bookingID) { int driverID = -1; String startTime = ""; float price = 0.0f; String source = ""; String destination = ""; String driver = ""; String cab = ""; int sourceID = -1; int destinationID = -1; int cabID = -1; int statusID = -1; BookingResponse bookingResponse = null; Connection connection = null; PreparedStatement preparedStatement = null; ResultSet resultSet = null; try { connection = DbConnect.getConnection(); preparedStatement = connection.prepareStatement(SQLConstants.DISPLAY_BOOKING_DETAILS); preparedStatement.setInt(1, bookingID); resultSet = preparedStatement.executeQuery(); if (resultSet.next()) { driverID = resultSet.getInt(1); startTime = resultSet.getString(2); sourceID = resultSet.getInt(3); destinationID = resultSet.getInt(4); cabID = resultSet.getInt(5); price = resultSet.getFloat(6); statusID = resultSet.getInt(7); } source = findLocation(sourceID); destination = findLocation(destinationID); driver = findDriverByID(driverID); cab = findCabByID(cabID); bookingResponse = new BookingResponse(bookingID, driver, cab, source, destination, startTime, statusID, price); return bookingResponse; } catch (SQLException e) { LOGGER.log(Level.SEVERE, "Error in displaying booking details."); return null; } finally { DbConnect.closeConnection(connection, preparedStatement, resultSet); } } /* * Retrieves the location using location ID. */ public String findLocation(int locationID) { String streetAddress = ""; String zipCode = ""; String location = ""; Connection connection = null; PreparedStatement preparedStatement = null; ResultSet resultSet = null; try { connection = DbConnect.getConnection(); preparedStatement = connection.prepareStatement(SQLConstants.GET_LOCATION); preparedStatement.setInt(1, locationID); resultSet = preparedStatement.executeQuery(); if (resultSet.next()) { streetAddress = resultSet.getString(1); zipCode = resultSet.getString(2); location = streetAddress + ", " + zipCode; } return location; } catch (SQLException e) { LOGGER.log(Level.SEVERE, "Error in finding address from DB."); return ""; } finally { DbConnect.closeConnection(connection, preparedStatement, resultSet); } } /* * Retrieves the driver details for the ride. */ public String findDriverByID(int driverID) { String driverName = ""; String driverContact = ""; String driver = ""; Connection connection = null; PreparedStatement preparedStatement = null; ResultSet resultSet = null; try { connection = DbConnect.getConnection(); preparedStatement = connection.prepareStatement(SQLConstants.GET_DRIVER_BY_ID); preparedStatement.setInt(1, driverID); resultSet = preparedStatement.executeQuery(); if (resultSet.next()) { driverName = resultSet.getString(1); driverContact = resultSet.getString(2); driver = driverName + "- " + driverContact; } return driver; } catch (NumberFormatException ne) { LOGGER.log(Level.WARNING, "Error in parsing details."); return ""; } catch (SQLException e) { LOGGER.log(Level.SEVERE, "Error in retrieving driver details from DB."); return ""; } finally { DbConnect.closeConnection(connection, preparedStatement, resultSet); } } /* * Retrieves the cab details for a ride. */ public String findCabByID(int cabID) { String cabModel = ""; String cabDescription = ""; String cab = ""; Connection connection = null; PreparedStatement preparedStatement = null; ResultSet resultSet = null; try { connection = DbConnect.getConnection(); preparedStatement = connection.prepareStatement(SQLConstants.GET_CAB_BY_ID); preparedStatement.setInt(1, cabID); resultSet = preparedStatement.executeQuery(); if (resultSet.next()) { cabModel = resultSet.getString(1); cabDescription = resultSet.getString(2); cab = cabModel + "- " + cabDescription; } return cab; } catch (NumberFormatException ne) { LOGGER.log(Level.WARNING, "Error in parsing details."); return ""; } catch (SQLException e) { LOGGER.log(Level.SEVERE, "Error in retrieving cab details from DB."); return ""; } finally { DbConnect.closeConnection(connection, preparedStatement, resultSet); } } /* * Retrieves the booking ID of a ride. */ public boolean checkBookingExists(int bID) { boolean check = false; Connection connection = null; PreparedStatement preparedStatement = null; ResultSet resultSet = null; try { connection = DbConnect.getConnection(); preparedStatement = connection.prepareStatement(SQLConstants.CHECK_BOOKING_EXISTS); preparedStatement.setInt(1, bID); resultSet = preparedStatement.executeQuery(); if (resultSet.next()) { check = true; } return check; } catch (SQLException e) { LOGGER.log(Level.SEVERE, "Error in checking if booking ID exists from DB."); return check; } finally { DbConnect.closeConnection(connection, preparedStatement, resultSet); } } /* * Updates customer profile. */ public void updateProfile(User user) { Connection connection = null; PreparedStatement preparedStatement = null; ResultSet resultSet = null; int userID = -1; try { connection = DbConnect.getConnection(); preparedStatement = connection.prepareStatement(SQLConstants.UPDATE_PROFILE); preparedStatement.setString(1, user.getUserName()); preparedStatement.setString(2, user.getMail()); preparedStatement.setString(3, user.getPassword()); preparedStatement.setString(4, user.getContact()); preparedStatement.executeUpdate(); userID = getUserID(user.getContact()); preparedStatement = connection.prepareStatement(SQLConstants.UPDATE_USER_ADDRESS); preparedStatement.setString(1, user.getAddress()); preparedStatement.setString(2, user.getCity()); preparedStatement.setString(3, user.getZipCode()); preparedStatement.setInt(4, userID); preparedStatement.executeUpdate(); } catch (SQLException e) { LOGGER.log(Level.SEVERE, "Error in updating personal details."); } finally { DbConnect.closeConnection(connection, preparedStatement, resultSet); } } /* * Cancels the ride of a customer. */ public int cancelRide(int bookingID) { int driverID = 0; Connection connection = null; PreparedStatement preparedStatement = null; ResultSet resultSet = null; try { connection = DbConnect.getConnection(); preparedStatement = connection.prepareStatement(SQLConstants.DISPLAY_BOOKING_DETAILS); preparedStatement.setInt(1, bookingID); resultSet = preparedStatement.executeQuery(); if (resultSet.next()) { driverID = resultSet.getInt(1); } preparedStatement = connection.prepareStatement(SQLConstants.CANCEL_RIDE); preparedStatement.setInt(1, 4); preparedStatement.setInt(2, bookingID); preparedStatement.executeUpdate(); return driverID; } catch (SQLException e) { LOGGER.log(Level.SEVERE, "Error in cancelling the ride."); return -1; } finally { DbConnect.closeConnection(connection, preparedStatement, resultSet); } } /* * Updates the driver status as available or unavailable depending on the ride. */ public void updateDriverStatus(int driverID, int flag) { Connection connection = null; PreparedStatement preparedStatement = null; ResultSet resultSet = null; try { connection = DbConnect.getConnection(); preparedStatement = connection.prepareStatement(SQLConstants.UPDATE_DRIVER_STATUS); if (flag == 0) { preparedStatement.setInt(1, 6); } else { preparedStatement.setInt(1, 5); } preparedStatement.setInt(2, driverID); preparedStatement.executeUpdate(); } catch (SQLException e) { LOGGER.log(Level.SEVERE, "Error in updating driver status."); } finally { DbConnect.closeConnection(connection, preparedStatement, resultSet); } } /* * Displays the travel history. */ public ArrayList<RideHistory> displayRideHistory(int userID, int flag) { ArrayList<RideHistory> history = null; RideHistory object = null; String startTime = ""; float price = 0.0f; String source = ""; String destination = ""; String person = ""; String cab = ""; int sourceID = -1; int statusID = -1; int destinationID = -1; int cabID = -1; int ID = -1; Connection connection = null; PreparedStatement preparedStatement = null; ResultSet resultSet = null; try { object = new RideHistory(); history = new ArrayList<RideHistory>(); connection = DbConnect.getConnection(); if (flag == 0) { preparedStatement = connection.prepareStatement(SQLConstants.DISPLAY_CUSTOMER_RIDE_HISTORY); } else { preparedStatement = connection.prepareStatement(SQLConstants.DISPLAY_DRIVER_RIDE_HISTORY); } preparedStatement.setInt(1, userID); resultSet = preparedStatement.executeQuery(); while (resultSet.next()) { ID = resultSet.getInt(1); startTime = resultSet.getString(2); sourceID = resultSet.getInt(3); destinationID = resultSet.getInt(4); cabID = resultSet.getInt(5); price = resultSet.getFloat(6); statusID = resultSet.getInt(7); source = findLocation(sourceID); destination = findLocation(destinationID); person = findDriverByID(ID); cab = findCabByID(cabID); object = new RideHistory(person, cab, startTime, source, destination, price, statusID); history.add(object); } return history; } catch (SQLException e) { LOGGER.log(Level.SEVERE, "Error in reading ride history from DB."); return null; } finally { DbConnect.closeConnection(connection, preparedStatement, resultSet); } } /* * Displays the travel history by location. */ public ArrayList<RideHistory> displayRideHistoryByLocation(int driverID, String zipCode) { ArrayList<RideHistory> history = null; RideHistory object = null; String startTime = ""; float price = 0.0f; String source = ""; String destination = ""; String user = ""; String cab = ""; int sourceID = -1; int statusID = -1; int destinationID = -1; int cabID = -1; int userID = -1; Connection connection = null; PreparedStatement preparedStatement = null; ResultSet resultSet = null; System.out.println(driverID); try { history = new ArrayList<RideHistory>(); connection = DbConnect.getConnection(); preparedStatement = connection.prepareStatement(SQLConstants.DISPLAY_RIDE_HISTORY_BY_LOCATION); preparedStatement.setString(1, zipCode); preparedStatement.setInt(2, driverID); resultSet = preparedStatement.executeQuery(); while (resultSet.next()) { userID = resultSet.getInt(1); startTime = resultSet.getString(2); sourceID = resultSet.getInt(3); destinationID = resultSet.getInt(4); cabID = resultSet.getInt(5); price = resultSet.getFloat(6); statusID = resultSet.getInt(7); source = findLocation(sourceID); destination = findLocation(destinationID); user = findDriverByID(userID); cab = findCabByID(cabID); object = new RideHistory(user, cab, startTime, source, destination, price, statusID); history.add(object); } return history; } catch (Exception e) { LOGGER.log(Level.SEVERE, "Error in reading ride history by locations from DB."); return null; } finally { DbConnect.closeConnection(connection, preparedStatement, resultSet); } } /* * Retrieves the booking ID of a ride for a completed Ride */ public boolean checkBookingExistsForRating(int bID, int userID) { boolean check = false; Connection connection = null; PreparedStatement preparedStatement = null; ResultSet resultSet = null; try { connection = DbConnect.getConnection(); preparedStatement = connection.prepareStatement(SQLConstants.CHECK_COMPLETED_BOOKING); preparedStatement.setInt(1, bID); preparedStatement.setInt(2, userID); resultSet = preparedStatement.executeQuery(); if (resultSet.next()) { check = true; } return check; } catch (SQLException e) { LOGGER.log(Level.SEVERE, "Error in checking if booking ID exists from DB."); return check; } finally { DbConnect.closeConnection(connection, preparedStatement, resultSet); } } /* * Rates a trip. */ public void rateTrip(float rating, int bookingID, int userID) { Connection connection = null; PreparedStatement preparedStatement = null; ResultSet resultSet = null; try { connection = DbConnect.getConnection(); preparedStatement = connection.prepareStatement(SQLConstants.INSERT_TRIP_RATING); preparedStatement.setInt(1, bookingID); preparedStatement.setFloat(2, rating); preparedStatement.setInt(3, userID); preparedStatement.setInt(4, userID); preparedStatement.executeUpdate(); } catch (SQLException e) { LOGGER.log(Level.SEVERE, "Error in inserting rating for a ride into DB."); } finally { DbConnect.closeConnection(connection, preparedStatement, resultSet); } } }
package com.ifisolution.cmsmanagerment.controller; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.ifisolution.cmsmanagerment.entities.Topic; import com.ifisolution.cmsmanagerment.services.TopicService; @RestController @RequestMapping("/api") public class TopicController { @Autowired private TopicService topicservice; @GetMapping(value = "/topic") public List<Topic> getAllTopic() { return topicservice.findAll(); } @GetMapping(value = "/topic/{id}") public Topic getTopicById(@PathVariable Integer id) { return topicservice.findById(id); } @PostMapping(value = "/topic") public Topic postTopic(@RequestBody Topic topic) { return topicservice.save(topic); } @PutMapping(value = "/topic/{id}") public Topic updateTopic(@RequestBody Topic topic, @PathVariable Integer id) { return topicservice.updateTopic(topic, id); } @DeleteMapping(value = "/topic/{id}") public ResponseEntity<Object> deleteTopic(@PathVariable Integer id) { return topicservice.deleteById(id); } }
package com.goodhealth.web.entity; import lombok.Data; import lombok.NoArgsConstructor; import org.hibernate.validator.constraints.NotBlank; import javax.persistence.*; import java.io.Serializable; /** * The persistent class for the new database table. * */ @Entity @Data @NoArgsConstructor @Table(name="news") public class News implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy=GenerationType.IDENTITY) @Column(name="new_id") private int newId; @Column(name="new_author") @NotBlank(message="发布者不得为空") private String newAuthor; @Column(name="new_date") private String newDate; @Column(name="new_detail") @NotBlank(message="详情不得为空") private String newDetail; @Column(name="new_url") @NotBlank(message="链接不得为空") private String newUrl; @Column(name="new_title") @NotBlank(message="标题不得为空") private String newTitle; }
package pruebas.ana.com.pruebasana; import android.app.Activity; import android.os.Bundle; import android.widget.ListView; import java.util.ArrayList; /** * Created by ISOL on 25/08/15. */ public class ListStates extends Activity{ private ListView stateList; private ArrayList<Club> list; private ListStateAdapter adapter; @Override protected void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); setContentView(R.layout.lista2_pruebas); stateList = (ListView)findViewById(R.id.listView2); list = new ArrayList<Club>(); llenado(); adapter=new ListStateAdapter(ListStates.this, list); stateList.setAdapter(adapter); } private void llenado(){ list.add(new Club("Guerrero")); list.add(new Club("Sonora")); list.add(new Club("Durango")); list.add(new Club("Chihuahua")); list.add(new Club("México")); list.add(new Club("Zacatecas")); list.add(new Club("Oaxaca")); list.add(new Club("Guerrero")); list.add(new Club("Yucatán")); list.add(new Club("Aguascalientes")); list.add(new Club("Puebla")); list.add(new Club("Tlaxcala")); list.add(new Club("Guanajuato")); list.add(new Club("Hidalgo")); } }
package com.example.weatherforecastapp.api; import com.example.weatherforecastapp.api.response.DailyForecastResponse; import retrofit2.Call; import retrofit2.http.GET; import retrofit2.http.Query; /** * Created by Erkut Demirhan on 14/10/17. */ public interface WeatherApiClient { @GET("daily") Call<DailyForecastResponse> getDailyForecastByLocation( @Query("appid") final String appId, @Query("mode") final String responseBodyType, @Query("units") final String measurementUnit, @Query("cnt") final int forecastDayCount, @Query("lat") final double latitude, @Query("lon") final double longitude); @GET("daily") Call<DailyForecastResponse> getDailyForecastByCityName( @Query("appid") final String appId, @Query("mode") final String responseBodyType, @Query("units") final String measurementUnit, @Query("cnt") final int forecastDayCount, @Query("q") final String cityName); }
package com.ovi.prescription.exception; import org.springframework.http.HttpStatus; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.web.bind.annotation.ResponseStatus; @ResponseStatus(HttpStatus.BAD_REQUEST) public class LoginException extends UsernameNotFoundException { public LoginException(String msg) { super(msg); } public LoginException(String msg, Throwable t) { super(msg, t); } }
package com.sabre.api.sacs.configuration; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; /** * The Spring configuration class indicating that instances * of classes in this module should be managed by the Spring context. * 扫描这个类的所在包,将符合要求的类实例放入spring的ioc容器 */ @Configuration @ComponentScan public class ConfigurationConfig { }
package Collectionsss; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.ListIterator; public class ArrayListEx { public static void main(String[] args) { // Array list will maintain insertion order. // ArrayList will allow duplicate records // We can add element // We can get element // Using index u can fetch the value List<String> arrayList = new ArrayList<String>(); // arrayList is empty so we areadding elements arrayList.add("Sai"); arrayList.add("Benz"); arrayList.add("Toyota"); arrayList.add("Buggati"); arrayList.add("CRV"); System.out.println(arrayList); // ArrayLIst will maintain insertion order.For eg if you insert new eleemnt ot // will accept // Duplicates will allow. arrayList.add("Buggati"); System.out.println(arrayList); // to retrive data using index System.out.println(arrayList.get(2)); // to find some element in which index it is in the arraylist System.out.println(arrayList.indexOf("Toyota")); System.out.println(arrayList.lastIndexOf("Buggati")); // if you try to fetch an eleemnt which is not in the List then it will give you // -1 System.out.println(arrayList.indexOf("Ambasador")); // adding one list to another list.copying one list to another List<String> newList = new ArrayList<String>(); newList.addAll(arrayList); System.out.println(newList); newList.clear(); System.out.println(newList); // to remove eleemn arrayList.remove(2); System.out.println(arrayList); arrayList.remove("CRV"); System.out.println(arrayList); arrayList.add(null); System.out.println(arrayList); arrayList.set(0, "Maruti"); System.out.println(arrayList); // to find the list whether it is empty or not System.out.println(arrayList.isEmpty()); // Iterate the list for (String string : arrayList) { System.out.println("Using for each loop : " + string); } for (int i = 0; i < arrayList.size(); i++) { System.out.println("Using for loop : " + arrayList.get(i)); } // forward traversing using list iterator ListIterator<String> iterator = arrayList.listIterator(); while (iterator.hasNext()) { System.out.println(iterator.next()); } ListIterator<String> iterator1 = arrayList.listIterator(); while (iterator1.hasPrevious()) { System.out.println(iterator1.next()); } // Iteration with iterator(Note: Not List Iterator) Iterator can only traverse // forward but not on reverse. // Hence we are using List iterator for better usage Iterator<String> it = arrayList.iterator(); while (it.hasNext()) { System.out.println("Forward only:" + it); } } }
package com.zhouyi.business.core.utils; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.net.URL; import java.util.ArrayList; import java.util.List; import org.apache.http.HttpEntity; import org.apache.http.HttpStatus; import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpPost; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.apache.http.message.BasicNameValuePair; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; /** * * 通过httpclient调用接口的方法 */ public class ClientSSL { private static final Logger LOG = LoggerFactory.getLogger(ClientSSL.class); /** * * post请求 */ public static Object httpClientPost(String url) { CloseableHttpClient httpclient = HttpClients.createDefault(); CloseableHttpResponse response = null; try { List<BasicNameValuePair> nvps = new ArrayList<BasicNameValuePair>(); HttpPost httpPost = new HttpPost(url); httpPost.setEntity(new UrlEncodedFormEntity(nvps, "UTF-8")); LOG.info("httpClientPost_url=" + url); response = httpclient.execute(httpPost); // LOG.info("httpClientPost_resp={}",JSON.toJSONString(response)); if (response.getStatusLine().getStatusCode() == HttpStatus.SC_MOVED_TEMPORARILY) { HttpEntity entity = response.getEntity(); JSONObject resultJsonObject = JSONObject.parseObject(responseContext(entity.getContent())); String location = resultJsonObject.getString("location"); if (location == null) { throw new IllegalStateException("Redirect URL no find"); } String errcode = resultJsonObject.getString("errcode"); if (errcode != null) { LOG.error("接口返回错误:" + resultJsonObject.getString("errmsg")); throw new IllegalStateException(resultJsonObject.getString("errmsg")); } } if (response.getStatusLine().getStatusCode() == HttpStatus.SC_MOVED_PERMANENTLY) { HttpEntity entity = response.getEntity(); System.out.println("header:" + response.getAllHeaders().toString()); String contentType = entity.getContentType().getValue(); System.out.println("contentType=" + contentType); JSONObject resultJsonObject = JSONObject.parseObject(responseContext(entity.getContent())); String location = resultJsonObject.getString("location"); if (location == null) { throw new IllegalStateException("Redirect URL no find"); } return new URL(location); } else if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { HttpEntity entity = response.getEntity(); String contentType = entity.getContentType().getValue();// application/json;charset=ISO-8859-1 System.out.println("contentType=" + contentType); return responseContext(entity.getContent()); } else if (response.getStatusLine().getStatusCode() == HttpStatus.SC_NOT_FOUND) { LOG.error("Page: " + url + " no find"); throw new IllegalStateException("404 Page no find"); } else { LOG.error(response.getStatusLine().getStatusCode() + " Business is not supported"); throw new IllegalStateException(response.getStatusLine().getStatusCode() + " Business is not supported"); } } catch (Exception e) { LOG.error("httpClientPost_err",e); } finally { if (response != null) { try { response.close(); } catch (IOException e) { LOG.error(e.toString()); } } } return ""; } private static String responseContext(InputStream input) { try { BufferedReader readContent = new BufferedReader(new InputStreamReader(input, "UTF-8")); String outStr = readContent.readLine(); StringBuilder sb = new StringBuilder(); while (outStr != null) { if (LOG.isDebugEnabled()) { LOG.debug(outStr); } sb.append(outStr); outStr = readContent.readLine(); } return sb.toString(); } catch (Exception e) { LOG.error("responseContext_err=",e); } finally { if (input != null) { try { input.close(); } catch (IOException e) { LOG.error(e.toString()); } } } return ""; } }
package com.marlabs.project.model; import java.util.Map; public class SimpleQuestion { public String description; public Map<String, String> options; public SimpleQuestion(String description, Map<String, String> options) { this.description = description; this.options = options; } @Override public String toString() { return "SimpleQuestion [description=" + description + ", options=" + options + "]"; } }
package pingpong; import java.net.*; import java.util.Scanner; import rmi.RMIException; import rmi.*; public class PingPongClient { public static void main(String[] args) { Scanner reader = new Scanner(System.in); System.out.println("Enter the IP address of the server"); String IP = reader.nextLine(); String result = ""; System.out.println("Enter the port of the server"); int port = Integer.parseInt(reader.nextLine()); InetSocketAddress address = new InetSocketAddress(IP, port); PingPongInterface server = Stub.create(PingPongInterface.class, address); System.out.println("Enter the idNumber"); int i = Integer.parseInt(reader.nextLine()); if(server != null) try { result = server.ping(i); } catch (RMIException e) { e.printStackTrace(); } System.out.println("Output: " + result); } }
package com.xvr.serviceBook.service.impl; import com.xvr.serviceBook.entity.Ticket; import com.xvr.serviceBook.event.TicketCreateEvent; import com.xvr.serviceBook.repository.TicketRepository; import com.xvr.serviceBook.service.TicketService; import com.xvr.serviceBook.service.servicedto.TicketServiceDto; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationEventPublisher; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.List; import java.util.Optional; @Service public class TicketServiceImpl implements TicketService { private final TicketRepository ticketRepository; private final ApplicationEventPublisher applicationEventPublisher; @Autowired public TicketServiceImpl(TicketRepository ticketRepository, ApplicationEventPublisher applicationEventPublisher) { this.ticketRepository = ticketRepository; this.applicationEventPublisher = applicationEventPublisher; } @Override public Page<Ticket> findAllTicketsPaginated(Pageable pageable) { return ticketRepository.findAll(pageable); } @Override public List<Ticket> findAllTicketsList() { return ticketRepository.findAll(); } @Override @Transactional public void save(TicketServiceDto ticketServiceDto) { Ticket ticket = Ticket.builder() .id(ticketServiceDto.getTicketId()) .endDateTicket(ticketServiceDto.getEndDateTicket()) .startDateTicket(ticketServiceDto.getStartDateTicket()) .ticketDescription(ticketServiceDto.getTicketDescription()) .clientDepartment(ticketServiceDto.getClientDepartment()) .equipment(ticketServiceDto.getEquipment()) .priorityTicket(ticketServiceDto.getPriorityTicket()) .statusTicket(ticketServiceDto.getStatus()) .workers(ticketServiceDto.getWorker()) .build(); ticketRepository.save(ticket); TicketCreateEvent ticketCreateEvent = new TicketCreateEvent(this, ticket); applicationEventPublisher.publishEvent(ticketCreateEvent); } @Override public Optional<Ticket> getTicketById(Long id) { return ticketRepository.findById(id); } //TODO @Override public Page<Ticket> findTicketsByDepartmentId(Pageable pageable, Long departmentId) { return null; } }
package com.hb.rssai.view.iView; import com.hb.rssai.bean.ResBase; /** * Created by Administrator on 2018/1/27 0027. */ public interface IModifyPasswordView { void showModifyResult(ResBase resBase); void loadError(Throwable throwable); String getOldPsd(); String getNewPsd(); String getNewSPsd(); void setCheckError(String error); }
package cn.bs.zjzc.presenter; import android.text.TextUtils; import cn.bs.zjzc.model.IForgotPasswordModel; import cn.bs.zjzc.model.callback.HttpTaskCallback; import cn.bs.zjzc.model.impl.ForgotPasswordModel; import cn.bs.zjzc.model.impl.LoginModel; import cn.bs.zjzc.net.GsonCallback; import cn.bs.zjzc.model.response.BaseResponse; import cn.bs.zjzc.net.PostHttpTask; import cn.bs.zjzc.net.RequestUrl; import cn.bs.zjzc.ui.view.IForgotPasswordView; import cn.bs.zjzc.util.DensityUtils; /** * Created by Ming on 2016/6/12. */ public class ForgotPasswordPresenter { private IForgotPasswordView mForgotPasswordView; private IForgotPasswordModel mForgotPasswordModel; public ForgotPasswordPresenter(IForgotPasswordView forgotPasswordView) { mForgotPasswordView = forgotPasswordView; mForgotPasswordModel = new ForgotPasswordModel(); } public void recoverPassword(String phone, String code, String passwd, String rePasswd) { mForgotPasswordModel.recoverPassword(phone, code, passwd, rePasswd, new HttpTaskCallback<BaseResponse>() { @Override public void onTaskFailed(String errorInfo) { mForgotPasswordView.showMsg(errorInfo); } @Override public void onTaskSuccess(BaseResponse data) { mForgotPasswordView.finish(); } }); } public void getVerificationCode(String phone, String type) { mForgotPasswordModel.getCode(phone, type, new HttpTaskCallback<BaseResponse>() { @Override public void onTaskFailed(String errorInfo) { mForgotPasswordView.showMsg(errorInfo); } @Override public void onTaskSuccess(BaseResponse data) { mForgotPasswordView.startCountDownTimer(); } }); } }
package com.rsm.yuri.projecttaxilivredriver.profile; import android.net.Uri; import android.util.Log; import com.rsm.yuri.projecttaxilivredriver.domain.FirebaseAPI; import com.rsm.yuri.projecttaxilivredriver.domain.FirebaseStorageFinishedListener; import com.rsm.yuri.projecttaxilivredriver.lib.base.EventBus; import com.rsm.yuri.projecttaxilivredriver.profile.events.ProfileEvent; /** * Created by yuri_ on 08/03/2018. */ public class ProfileRepositoryImpl implements ProfileRepository { private EventBus eventBus; private FirebaseAPI firebase; public ProfileRepositoryImpl(EventBus eventBus, FirebaseAPI firebase) { this.eventBus = eventBus; this.firebase = firebase; } @Override public void uploadPhoto(Uri selectedImageUri) { if(selectedImageUri!=null) { Log.d("d", "post(url, ProfileEventUPLOAD_INIT)"); post(ProfileEvent.UPLOAD_INIT); firebase.updateAvatarPhoto(selectedImageUri, new FirebaseStorageFinishedListener() { @Override public void onSuccess(String url) { Log.d("d", "post(url, ProfileEventUPLOAD_COMPLETE)"); post(url, ProfileEvent.UPLOAD_COMPLETE); } @Override public void onError(String error) { post(ProfileEvent.UPLOAD_ERROR, error); } }); } } private void post(int type){ post(null, type, null); } private void post(String url, int type){ post(url, type, null); } private void post(int type, String error){ post(null, type, error); } private void post(String url, int type, String error){ ProfileEvent event = new ProfileEvent(); event.setUlrPhotoUser(url); event.setType(type); event.setError(error); eventBus.post(event); } }
package com.emily.framework.autoconfigure.apilog.interceptor; import com.emily.framework.common.utils.RequestUtils; import com.emily.framework.common.utils.UUIDUtils; import com.emily.framework.context.apilog.po.AsyncLogAop; import com.emily.framework.context.apilog.service.AsyncLogAopService; import com.emily.framework.context.request.RequestService; import org.aopalliance.intercept.MethodInterceptor; import org.aopalliance.intercept.MethodInvocation; import org.apache.commons.lang3.time.StopWatch; import javax.servlet.http.HttpServletRequest; import java.util.Date; /** * @Description: 在接口到达具体的目标即控制器方法之前获取方法的调用权限,可以在接口方法之前或者之后做Advice(增强)处理 * @Version: 1.0 */ public class ApiLogMethodInterceptor implements MethodInterceptor { private AsyncLogAopService asyncLogAopService; public ApiLogMethodInterceptor(AsyncLogAopService asyncLogAopService) { this.asyncLogAopService = asyncLogAopService; } /** * 拦截接口日志 * * @param invocation 接口方法切面连接点 * @return * @throws Throwable */ @Override public Object invoke(MethodInvocation invocation) throws Throwable { //获取HttpServletRequest对象 HttpServletRequest request = RequestUtils.getRequest(); //获取请求唯一编号 String tId = UUIDUtils.randomUUID(); //将请求唯一编号设置为属性T_ID的值 request.setAttribute("T_ID", tId); //封装异步日志信息 AsyncLogAop asyncLog = new AsyncLogAop(); //事务唯一编号 asyncLog.settId(tId); //请求时间 asyncLog.setRequestTime(new Date()); //控制器Class asyncLog.setClazz(invocation.getThis().getClass()); //控制器方法名 asyncLog.setMethodName(invocation.getMethod().getName()); //请求数据类型-ContentType asyncLog.setContentType(request.getContentType()); //请求url asyncLog.setRequestUrl(request.getRequestURL().toString()); //请求方法 asyncLog.setMethod(request.getMethod()); //请求协议 asyncLog.setProtocol(request.getProtocol()); //请求参数 asyncLog.setRequestParams(RequestService.getParameterMap(request)); //记录接口请求信息 asyncLogAopService.traceRequest(asyncLog); //新建计时器并开始计时 StopWatch stopWatch = StopWatch.createStarted(); //调用真实的action方法 Object result = invocation.proceed(); //暂停计时 stopWatch.stop(); //耗时 asyncLog.setSpentTime(stopWatch.getTime()); //响应结果 asyncLog.setResponseBody(result); //响应时间 asyncLog.setResponseTime(new Date()); //响应数据类型-ContentType asyncLog.setContentType(RequestUtils.getResponse().getContentType()); //异步记录接口响应信息 asyncLogAopService.traceResponse(asyncLog); return result; } }
package digital_goods.global.page_object; import com.codeborne.selenide.SelenideElement; import global.helpers.AbstractPage; import global.helpers.NameOfElement; import org.openqa.selenium.support.FindBy; public class AllMobilePages extends AbstractPage { @NameOfElement("Grey area") @FindBy(xpath = "/html/body/div[2]/div[2]/div/div/div[3]/div/div") public SelenideElement greyArea; }
public class App { public static void main(String[] args) throws Exception { int tong=0; for (int i=0; i<=10;i++){ if (i%2==0){ tong += i; System.out.println(i); } } System.out.println(tong); } }
package com.dokia.hihocoder; import java.util.Scanner; public class T1120 { private static int mineCount = 0; private static int notMineCount = 0; public static void main(String[] args) { Scanner in = new Scanner(System.in); int num = in.nextInt(); while (num-- > 0) { int N = in.nextInt(); int M = in.nextInt(); int[][] maze = new int[N][M]; for(int i = 0; i < N; i++) for(int j = 0; j < M; j++) maze[i][j] = in.nextInt(); handleMaze(maze); System.out.println(mineCount + " " + notMineCount); mineCount = 0; notMineCount = 0; } in.close(); } private static void handleMaze(int[][] maze) { int totalCount = 0; do { totalCount = 0; for(int i = 0; i < maze.length; i++) for(int j = 0; j < maze[0].length; j++) { totalCount += countUnknownNeighbour(maze, i, j); } } while (totalCount > 0); } private static int countUnknownNeighbour(int[][] maze, int row, int col) { if (maze.length <= 0 || maze[0].length <= 0) return 0; if (maze.length <= row || maze[0].length <= col) return 0; int mineMark = maze[row][col]; int unKnownCount = 0; int knownMineCount = 0; for(int i = -1; i < 2; i++) for(int j = -1; j < 2; j++) { if (row + i < 0 || row + i >= maze.length || col + j < 0 || col + j >= maze[0].length) continue; if (maze[row + i][col + j] == -1) unKnownCount++; if (maze[row + i][col + j] == -3) knownMineCount++; } if (unKnownCount == 0) return 0; if (mineMark != knownMineCount && mineMark != knownMineCount + unKnownCount) return 0; int type = 0; if (mineMark == knownMineCount) { type = -2; } else if (mineMark == knownMineCount + unKnownCount) { type = -3; } for(int i = -1; i < 2; i++) for(int j = -1; j < 2; j++) { if (row + i < 0 || row + i >= maze.length || col + j < 0 || col + j >= maze[0].length) continue; if (maze[row + i][col + j] == -1) { // mine set to -3 maze[row + i][col + j] = type; if (type == -2) { notMineCount++; } else { mineCount++; } } } return unKnownCount; } }
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package pe.egcc.service; /** * * @author Luis Arana */ public class MateService { public double sumar(double n1, double n2){ return (n1 + n2); } public double restar(double n1, double n2){ return (n1 - n2); } public double multiplicar(double n1, double n2){ return (n1 * n2); } public double dividir(double n1, double n2){ return (n1 / n2); } }
package com.demo.LogicJob.FormDTO; import com.demo.LogicJob.Entity.JobLogic; import lombok.*; @Getter @Setter @AllArgsConstructor @NoArgsConstructor @Builder public class TaskForm { private Long taskId; private Long JobId; private String taskName; private int taskValue; private Long taskWorker; private Long taskChecker; private String taskStatus; private JobForm jobForm; public TaskForm(Long jobId) { this.JobId = jobId; } public TaskForm(Long jobId, Long taskId) { this.JobId = jobId; this.taskId = taskId; } }
/** Author: Drew Kestell Date: 9/22/2014 E-mail: drew.kestell@gmail.com Exercise Status: Complete This application will take a list of integers of even length, and for each set of two adjacent integers, it will reverse the order of those two integers and copy the new list of integers into an array. */ package DPEX; public class SeperateByBlocks { public static void main(String[] args) { int[] intList = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; int[] reversedIntList = new int[intList.length]; int blockSize = 2; int amountOfBlocks = intList.length / 2; int counter = 1; while (counter <= amountOfBlocks) { for (int i = counter * blockSize; i >= counter; i--); { reversedIntList[(counter * blockSize) - 2] = intList[(counter * blockSize) - 1]; reversedIntList[(counter * blockSize) - 1] = intList[(counter * blockSize) - 2]; counter++; } } for (int i = 0; i < reversedIntList.length; i++) { System.out.println(reversedIntList[i]); } } }
package com.example.tocasorte; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.widget.*; import android.view.*; import org.w3c.dom.Text; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; import java.util.Comparator; public class HomeActivity extends Activity { private Button EuromilionButton, TotobolaButton, TotolotoButton, SettingsButton, MiniGameButton; TextView tv_displayUsername; private static String FILE_NAME="username.txt"; private static String SETTINGS_FILE="settings.txt"; int userSettings; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_home); userSettings=getUserSettings(); tv_displayUsername = findViewById(R.id.tv_displayUsername); displayUsername(); EuromilionButton = findViewById(R.id.Euromilionbutton); EuromilionButton.setOnClickListener(new View.OnClickListener(){ @Override public void onClick(View v){ openEuromilionActivity(); } }); TotobolaButton = findViewById(R.id.Totobolabutton); TotobolaButton.setOnClickListener(new View.OnClickListener(){ @Override public void onClick(View v){ openTotobolaActivity(); } }); TotolotoButton = findViewById(R.id.Totolotobutton); TotolotoButton.setOnClickListener(new View.OnClickListener(){ @Override public void onClick(View v){ openTotolotoActivity(); } }); SettingsButton = findViewById(R.id.Settingsbutton); SettingsButton.setOnClickListener(new View.OnClickListener(){ @Override public void onClick(View v){ openSettingsActivity(); } }); MiniGameButton = findViewById(R.id.MiniGameButton); MiniGameButton.setOnClickListener(new View.OnClickListener(){ @Override public void onClick(View v){ openMiniGameActivity(); } }); } @Override protected void onDestroy() { File euromillionDir = new File (getFilesDir() + "/" + "euromillion_folder.txt"); File totolotoDir = new File(getFilesDir() + "/" + "totoloto_folder.txt"); File totobolaDir = new File(getFilesDir() + "/" + "totobola_folder.txt"); super.onDestroy(); applyUserSettings(euromillionDir); applyUserSettings(totolotoDir); applyUserSettings(totobolaDir); } public void openEuromilionActivity(){ Intent intent = new Intent(this, EuromilionActivity.class); startActivity(intent); } public void openTotobolaActivity(){ Intent intent = new Intent(this, TotobolaActivity.class); startActivity(intent); } public void openTotolotoActivity(){ Intent intent = new Intent(this, TotolotoActivity.class); startActivity(intent); } public void openSettingsActivity(){ Intent intent = new Intent(this, SettingsActivity.class); startActivity(intent); } public void openMiniGameActivity(){ Intent intent = new Intent(this, MiniGame.class); startActivity(intent); } public void displayUsername(){ FileInputStream fis = null; try{ fis = openFileInput(FILE_NAME); InputStreamReader isr = new InputStreamReader(fis); BufferedReader br = new BufferedReader(isr); StringBuilder sb = new StringBuilder(); String username; while((username = br.readLine()) != null) { sb.append(username).append("\n"); } tv_displayUsername.setText("Bem-Vindo, " + sb.toString()); }catch (FileNotFoundException e) { e.printStackTrace(); }catch(IOException e){ e.printStackTrace(); }finally { if (fis != null){ try{ fis.close(); }catch(IOException e){ e.printStackTrace(); } } } } public void applyUserSettings(File f) { File[] filesArray = f.listFiles(); if(filesArray.length == userSettings) { return; } Arrays.sort(filesArray, new Comparator<File>() { @Override public int compare(File o1, File o2) { return Long.valueOf(o2.lastModified()).compareTo(o1.lastModified()); } }); for (int i = 0; i < filesArray.length; i++) { if (i >= userSettings) { if (filesArray[i].delete()) { //Toast.makeText(this, "Files Were Deleted", Toast.LENGTH_SHORT).show(); } } } } public int getUserSettings() { FileInputStream fis = null; int result=1; try { fis = openFileInput(SETTINGS_FILE); InputStreamReader isr = new InputStreamReader(fis); BufferedReader br = new BufferedReader(isr); StringBuilder sb = new StringBuilder(); result = Integer.parseInt(br.readLine()); } catch (IOException e) { e.printStackTrace(); } return result; } }
package com.template.data.remote; import android.arch.lifecycle.LiveData; import android.support.annotation.NonNull; import com.template.base.BaseRemoteDataSource; import com.template.data.model.api.TestEntity; import javax.inject.Inject; import javax.inject.Singleton; @Singleton public class RemoteDataSource extends BaseRemoteDataSource implements DataSourceInterface { private final ApiService wb; @Inject RemoteDataSource(@NonNull ApiService wb) { this.wb = wb; } @Override public LiveData<Resource<TestEntity>> getHome() { return executeRequest(wb.getHome()); } }
package com.github.frostyaxe.cucumber.dataclasses; import org.springframework.stereotype.Component; import com.github.frostyaxe.datafactory.DataFactory; import com.github.frostyaxe.datafactory.annotations.FactoryConfig; import com.github.frostyaxe.datafactory.annotations.SearchData; @FactoryConfig( host = "localhost", port = 8081 ) @Component public class HotelDataClass { @SearchData( path = "hotel/goingTo" ) private String goingTo; @SearchData( path = "hotel/checkIn" ) private String checkIn; @SearchData( path = "hotel/checkOut" ) private String checkOut; public HotelDataClass() { DataFactory.initData(this); } public String getGoingTo() { return goingTo; } public String getCheckIn() { return checkIn; } public String getCheckOut() { return checkOut; } }
package com.tencent.mm.plugin.card.model; import android.os.Parcel; import android.os.Parcelable.Creator; import com.tencent.mm.plugin.card.model.CardGiftInfo.AccepterItem; class CardGiftInfo$AccepterItem$1 implements Creator<AccepterItem> { CardGiftInfo$AccepterItem$1() { } public final /* synthetic */ Object createFromParcel(Parcel parcel) { return new AccepterItem(parcel, (byte) 0); } public final /* bridge */ /* synthetic */ Object[] newArray(int i) { return new AccepterItem[i]; } }
package com.ybh.front.model; import java.math.BigDecimal; import java.util.Date; public class Product_Domain { /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.id * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private Integer id; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.username * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String username; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.Domain * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String domain; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.ServerlistID * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private Integer serverlistid; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.Domaintype * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String domaintype; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.status * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String status; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.starttime * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private Date starttime; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.endtime * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private Date endtime; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.inipass * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String inipass; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.agent1 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String agent1; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.agent2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String agent2; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.years * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private Integer years; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.Domain_API * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private Integer domainApi; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.isbyhost * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String isbyhost; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.Hosttype * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String hosttype; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.byid * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private Integer byid; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.orderbyid * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private Integer orderbyid; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.DNS_API * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private Integer dnsApi; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.uname1 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String uname1; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.uname2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String uname2; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.uname3 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String uname3; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.uname4 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String uname4; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.rname1 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String rname1; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.rname2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String rname2; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.ust * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String ust; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.uprov * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String uprov; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.ucity1 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String ucity1; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.ucity2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String ucity2; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.uaddr1 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String uaddr1; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.uaddr2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String uaddr2; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.location * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String location; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.uzip * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String uzip; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.utelc * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String utelc; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.utela * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String utela; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.uteln * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String uteln; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.utele * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String utele; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.ufaxc * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String ufaxc; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.ufaxa * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String ufaxa; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.ufaxn * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String ufaxn; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.ufaxe * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String ufaxe; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.uemail * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String uemail; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.aname1 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String aname1; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.aname2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String aname2; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.atelc * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String atelc; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.atela * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String atela; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.ateln * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String ateln; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.atele * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String atele; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.afaxc * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String afaxc; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.afaxa * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String afaxa; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.afaxn * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String afaxn; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.afaxe * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String afaxe; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.aemail * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String aemail; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.dns1 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String dns1; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.dns2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String dns2; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.emailstatus * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String emailstatus; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.istemplate * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String istemplate; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.NameServer1 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String nameserver1; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.NameServer2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String nameserver2; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.OrganizationZH * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String organizationzh; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.OrganizationEN * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String organizationen; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.StreetZH * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String streetzh; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.StreetEN * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String streeten; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.CityZH * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String cityzh; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.CityEN * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String cityen; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.Country * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String country; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.Province * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String province; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.Postcode * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String postcode; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.NameZH * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String namezh; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.NameEN * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String nameen; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.PhoneRegionCode * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String phoneregioncode; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.PhoneAreaCode * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String phoneareacode; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.PhoneNumber * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String phonenumber; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.PhoneExt * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String phoneext; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.FaxRegionCode * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String faxregioncode; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.FaxAreaCode * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String faxareacode; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.FaxNumber * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String faxnumber; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.FaxExt * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String faxext; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.Email * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String email; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.Trade * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String trade; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.Manager * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String manager; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.OrganizationZH2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String organizationzh2; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.OrganizationEN2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String organizationen2; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.StreetZH2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String streetzh2; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.StreetEN2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String streeten2; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.CityZH2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String cityzh2; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.CityEN2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String cityen2; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.Country2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String country2; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.Province2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String province2; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.Postcode2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String postcode2; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.NameZH2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String namezh2; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.NameEN2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String nameen2; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.PhoneRegionCode2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String phoneregioncode2; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.PhoneAreaCode2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String phoneareacode2; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.PhoneNumber2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String phonenumber2; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.PhoneExt2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String phoneext2; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.FaxRegionCode2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String faxregioncode2; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.FaxAreaCode2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String faxareacode2; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.FaxNumber2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String faxnumber2; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.FaxExt2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String faxext2; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.Email2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String email2; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.Trade2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String trade2; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.Manager2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String manager2; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.DomainComplex * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String domaincomplex; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.Encode * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String encode; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.strCompanyCN * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String strcompanycn; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.strCompanyEN * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String strcompanyen; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.strAddressCN * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String straddresscn; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.strAddressEN * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String straddressen; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.strCityCN * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String strcitycn; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.strCityEN * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String strcityen; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.strProvince * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String strprovince; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.strPostcode * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String strpostcode; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.strNameCN * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String strnamecn; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.strNameEN * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String strnameen; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.intPhoneAreaCode * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String intphoneareacode; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.intPhoneNumber * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String intphonenumber; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.intFaxAreaCode * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String intfaxareacode; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.intFaxNumber * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String intfaxnumber; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.strEmail * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String stremail; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.strTrade * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String strtrade; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.strManager * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String strmanager; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.kefu * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String kefu; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.realmoney * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private BigDecimal realmoney; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.smsstatus * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String smsstatus; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.type1 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private Integer type1; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.DNScount * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private Integer dnscount; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.api7select * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private Integer api7select; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.dns3 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String dns3; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.dns4 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String dns4; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.dns5 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String dns5; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.dns6 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String dns6; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column FreeHost_Product_Domain.realnameID * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ private String realnameid; /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.id * * @return the value of FreeHost_Product_Domain.id * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public Integer getId() { return id; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.id * * @param id the value for FreeHost_Product_Domain.id * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setId(Integer id) { this.id = id; } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.username * * @return the value of FreeHost_Product_Domain.username * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getUsername() { return username; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.username * * @param username the value for FreeHost_Product_Domain.username * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setUsername(String username) { this.username = username == null ? null : username.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.Domain * * @return the value of FreeHost_Product_Domain.Domain * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getDomain() { return domain; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.Domain * * @param domain the value for FreeHost_Product_Domain.Domain * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setDomain(String domain) { this.domain = domain == null ? null : domain.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.ServerlistID * * @return the value of FreeHost_Product_Domain.ServerlistID * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public Integer getServerlistid() { return serverlistid; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.ServerlistID * * @param serverlistid the value for FreeHost_Product_Domain.ServerlistID * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setServerlistid(Integer serverlistid) { this.serverlistid = serverlistid; } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.Domaintype * * @return the value of FreeHost_Product_Domain.Domaintype * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getDomaintype() { return domaintype; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.Domaintype * * @param domaintype the value for FreeHost_Product_Domain.Domaintype * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setDomaintype(String domaintype) { this.domaintype = domaintype == null ? null : domaintype.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.status * * @return the value of FreeHost_Product_Domain.status * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getStatus() { return status; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.status * * @param status the value for FreeHost_Product_Domain.status * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setStatus(String status) { this.status = status == null ? null : status.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.starttime * * @return the value of FreeHost_Product_Domain.starttime * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public Date getStarttime() { return starttime; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.starttime * * @param starttime the value for FreeHost_Product_Domain.starttime * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setStarttime(Date starttime) { this.starttime = starttime; } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.endtime * * @return the value of FreeHost_Product_Domain.endtime * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public Date getEndtime() { return endtime; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.endtime * * @param endtime the value for FreeHost_Product_Domain.endtime * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setEndtime(Date endtime) { this.endtime = endtime; } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.inipass * * @return the value of FreeHost_Product_Domain.inipass * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getInipass() { return inipass; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.inipass * * @param inipass the value for FreeHost_Product_Domain.inipass * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setInipass(String inipass) { this.inipass = inipass == null ? null : inipass.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.agent1 * * @return the value of FreeHost_Product_Domain.agent1 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getAgent1() { return agent1; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.agent1 * * @param agent1 the value for FreeHost_Product_Domain.agent1 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setAgent1(String agent1) { this.agent1 = agent1 == null ? null : agent1.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.agent2 * * @return the value of FreeHost_Product_Domain.agent2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getAgent2() { return agent2; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.agent2 * * @param agent2 the value for FreeHost_Product_Domain.agent2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setAgent2(String agent2) { this.agent2 = agent2 == null ? null : agent2.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.years * * @return the value of FreeHost_Product_Domain.years * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public Integer getYears() { return years; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.years * * @param years the value for FreeHost_Product_Domain.years * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setYears(Integer years) { this.years = years; } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.Domain_API * * @return the value of FreeHost_Product_Domain.Domain_API * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public Integer getDomainApi() { return domainApi; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.Domain_API * * @param domainApi the value for FreeHost_Product_Domain.Domain_API * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setDomainApi(Integer domainApi) { this.domainApi = domainApi; } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.isbyhost * * @return the value of FreeHost_Product_Domain.isbyhost * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getIsbyhost() { return isbyhost; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.isbyhost * * @param isbyhost the value for FreeHost_Product_Domain.isbyhost * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setIsbyhost(String isbyhost) { this.isbyhost = isbyhost == null ? null : isbyhost.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.Hosttype * * @return the value of FreeHost_Product_Domain.Hosttype * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getHosttype() { return hosttype; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.Hosttype * * @param hosttype the value for FreeHost_Product_Domain.Hosttype * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setHosttype(String hosttype) { this.hosttype = hosttype == null ? null : hosttype.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.byid * * @return the value of FreeHost_Product_Domain.byid * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public Integer getByid() { return byid; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.byid * * @param byid the value for FreeHost_Product_Domain.byid * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setByid(Integer byid) { this.byid = byid; } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.orderbyid * * @return the value of FreeHost_Product_Domain.orderbyid * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public Integer getOrderbyid() { return orderbyid; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.orderbyid * * @param orderbyid the value for FreeHost_Product_Domain.orderbyid * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setOrderbyid(Integer orderbyid) { this.orderbyid = orderbyid; } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.DNS_API * * @return the value of FreeHost_Product_Domain.DNS_API * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public Integer getDnsApi() { return dnsApi; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.DNS_API * * @param dnsApi the value for FreeHost_Product_Domain.DNS_API * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setDnsApi(Integer dnsApi) { this.dnsApi = dnsApi; } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.uname1 * * @return the value of FreeHost_Product_Domain.uname1 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getUname1() { return uname1; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.uname1 * * @param uname1 the value for FreeHost_Product_Domain.uname1 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setUname1(String uname1) { this.uname1 = uname1 == null ? null : uname1.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.uname2 * * @return the value of FreeHost_Product_Domain.uname2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getUname2() { return uname2; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.uname2 * * @param uname2 the value for FreeHost_Product_Domain.uname2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setUname2(String uname2) { this.uname2 = uname2 == null ? null : uname2.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.uname3 * * @return the value of FreeHost_Product_Domain.uname3 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getUname3() { return uname3; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.uname3 * * @param uname3 the value for FreeHost_Product_Domain.uname3 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setUname3(String uname3) { this.uname3 = uname3 == null ? null : uname3.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.uname4 * * @return the value of FreeHost_Product_Domain.uname4 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getUname4() { return uname4; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.uname4 * * @param uname4 the value for FreeHost_Product_Domain.uname4 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setUname4(String uname4) { this.uname4 = uname4 == null ? null : uname4.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.rname1 * * @return the value of FreeHost_Product_Domain.rname1 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getRname1() { return rname1; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.rname1 * * @param rname1 the value for FreeHost_Product_Domain.rname1 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setRname1(String rname1) { this.rname1 = rname1 == null ? null : rname1.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.rname2 * * @return the value of FreeHost_Product_Domain.rname2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getRname2() { return rname2; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.rname2 * * @param rname2 the value for FreeHost_Product_Domain.rname2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setRname2(String rname2) { this.rname2 = rname2 == null ? null : rname2.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.ust * * @return the value of FreeHost_Product_Domain.ust * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getUst() { return ust; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.ust * * @param ust the value for FreeHost_Product_Domain.ust * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setUst(String ust) { this.ust = ust == null ? null : ust.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.uprov * * @return the value of FreeHost_Product_Domain.uprov * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getUprov() { return uprov; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.uprov * * @param uprov the value for FreeHost_Product_Domain.uprov * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setUprov(String uprov) { this.uprov = uprov == null ? null : uprov.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.ucity1 * * @return the value of FreeHost_Product_Domain.ucity1 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getUcity1() { return ucity1; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.ucity1 * * @param ucity1 the value for FreeHost_Product_Domain.ucity1 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setUcity1(String ucity1) { this.ucity1 = ucity1 == null ? null : ucity1.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.ucity2 * * @return the value of FreeHost_Product_Domain.ucity2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getUcity2() { return ucity2; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.ucity2 * * @param ucity2 the value for FreeHost_Product_Domain.ucity2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setUcity2(String ucity2) { this.ucity2 = ucity2 == null ? null : ucity2.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.uaddr1 * * @return the value of FreeHost_Product_Domain.uaddr1 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getUaddr1() { return uaddr1; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.uaddr1 * * @param uaddr1 the value for FreeHost_Product_Domain.uaddr1 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setUaddr1(String uaddr1) { this.uaddr1 = uaddr1 == null ? null : uaddr1.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.uaddr2 * * @return the value of FreeHost_Product_Domain.uaddr2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getUaddr2() { return uaddr2; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.uaddr2 * * @param uaddr2 the value for FreeHost_Product_Domain.uaddr2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setUaddr2(String uaddr2) { this.uaddr2 = uaddr2 == null ? null : uaddr2.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.location * * @return the value of FreeHost_Product_Domain.location * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getLocation() { return location; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.location * * @param location the value for FreeHost_Product_Domain.location * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setLocation(String location) { this.location = location == null ? null : location.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.uzip * * @return the value of FreeHost_Product_Domain.uzip * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getUzip() { return uzip; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.uzip * * @param uzip the value for FreeHost_Product_Domain.uzip * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setUzip(String uzip) { this.uzip = uzip == null ? null : uzip.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.utelc * * @return the value of FreeHost_Product_Domain.utelc * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getUtelc() { return utelc; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.utelc * * @param utelc the value for FreeHost_Product_Domain.utelc * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setUtelc(String utelc) { this.utelc = utelc == null ? null : utelc.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.utela * * @return the value of FreeHost_Product_Domain.utela * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getUtela() { return utela; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.utela * * @param utela the value for FreeHost_Product_Domain.utela * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setUtela(String utela) { this.utela = utela == null ? null : utela.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.uteln * * @return the value of FreeHost_Product_Domain.uteln * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getUteln() { return uteln; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.uteln * * @param uteln the value for FreeHost_Product_Domain.uteln * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setUteln(String uteln) { this.uteln = uteln == null ? null : uteln.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.utele * * @return the value of FreeHost_Product_Domain.utele * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getUtele() { return utele; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.utele * * @param utele the value for FreeHost_Product_Domain.utele * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setUtele(String utele) { this.utele = utele == null ? null : utele.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.ufaxc * * @return the value of FreeHost_Product_Domain.ufaxc * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getUfaxc() { return ufaxc; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.ufaxc * * @param ufaxc the value for FreeHost_Product_Domain.ufaxc * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setUfaxc(String ufaxc) { this.ufaxc = ufaxc == null ? null : ufaxc.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.ufaxa * * @return the value of FreeHost_Product_Domain.ufaxa * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getUfaxa() { return ufaxa; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.ufaxa * * @param ufaxa the value for FreeHost_Product_Domain.ufaxa * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setUfaxa(String ufaxa) { this.ufaxa = ufaxa == null ? null : ufaxa.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.ufaxn * * @return the value of FreeHost_Product_Domain.ufaxn * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getUfaxn() { return ufaxn; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.ufaxn * * @param ufaxn the value for FreeHost_Product_Domain.ufaxn * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setUfaxn(String ufaxn) { this.ufaxn = ufaxn == null ? null : ufaxn.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.ufaxe * * @return the value of FreeHost_Product_Domain.ufaxe * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getUfaxe() { return ufaxe; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.ufaxe * * @param ufaxe the value for FreeHost_Product_Domain.ufaxe * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setUfaxe(String ufaxe) { this.ufaxe = ufaxe == null ? null : ufaxe.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.uemail * * @return the value of FreeHost_Product_Domain.uemail * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getUemail() { return uemail; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.uemail * * @param uemail the value for FreeHost_Product_Domain.uemail * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setUemail(String uemail) { this.uemail = uemail == null ? null : uemail.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.aname1 * * @return the value of FreeHost_Product_Domain.aname1 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getAname1() { return aname1; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.aname1 * * @param aname1 the value for FreeHost_Product_Domain.aname1 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setAname1(String aname1) { this.aname1 = aname1 == null ? null : aname1.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.aname2 * * @return the value of FreeHost_Product_Domain.aname2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getAname2() { return aname2; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.aname2 * * @param aname2 the value for FreeHost_Product_Domain.aname2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setAname2(String aname2) { this.aname2 = aname2 == null ? null : aname2.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.atelc * * @return the value of FreeHost_Product_Domain.atelc * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getAtelc() { return atelc; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.atelc * * @param atelc the value for FreeHost_Product_Domain.atelc * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setAtelc(String atelc) { this.atelc = atelc == null ? null : atelc.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.atela * * @return the value of FreeHost_Product_Domain.atela * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getAtela() { return atela; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.atela * * @param atela the value for FreeHost_Product_Domain.atela * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setAtela(String atela) { this.atela = atela == null ? null : atela.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.ateln * * @return the value of FreeHost_Product_Domain.ateln * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getAteln() { return ateln; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.ateln * * @param ateln the value for FreeHost_Product_Domain.ateln * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setAteln(String ateln) { this.ateln = ateln == null ? null : ateln.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.atele * * @return the value of FreeHost_Product_Domain.atele * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getAtele() { return atele; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.atele * * @param atele the value for FreeHost_Product_Domain.atele * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setAtele(String atele) { this.atele = atele == null ? null : atele.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.afaxc * * @return the value of FreeHost_Product_Domain.afaxc * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getAfaxc() { return afaxc; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.afaxc * * @param afaxc the value for FreeHost_Product_Domain.afaxc * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setAfaxc(String afaxc) { this.afaxc = afaxc == null ? null : afaxc.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.afaxa * * @return the value of FreeHost_Product_Domain.afaxa * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getAfaxa() { return afaxa; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.afaxa * * @param afaxa the value for FreeHost_Product_Domain.afaxa * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setAfaxa(String afaxa) { this.afaxa = afaxa == null ? null : afaxa.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.afaxn * * @return the value of FreeHost_Product_Domain.afaxn * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getAfaxn() { return afaxn; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.afaxn * * @param afaxn the value for FreeHost_Product_Domain.afaxn * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setAfaxn(String afaxn) { this.afaxn = afaxn == null ? null : afaxn.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.afaxe * * @return the value of FreeHost_Product_Domain.afaxe * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getAfaxe() { return afaxe; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.afaxe * * @param afaxe the value for FreeHost_Product_Domain.afaxe * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setAfaxe(String afaxe) { this.afaxe = afaxe == null ? null : afaxe.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.aemail * * @return the value of FreeHost_Product_Domain.aemail * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getAemail() { return aemail; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.aemail * * @param aemail the value for FreeHost_Product_Domain.aemail * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setAemail(String aemail) { this.aemail = aemail == null ? null : aemail.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.dns1 * * @return the value of FreeHost_Product_Domain.dns1 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getDns1() { return dns1; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.dns1 * * @param dns1 the value for FreeHost_Product_Domain.dns1 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setDns1(String dns1) { this.dns1 = dns1 == null ? null : dns1.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.dns2 * * @return the value of FreeHost_Product_Domain.dns2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getDns2() { return dns2; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.dns2 * * @param dns2 the value for FreeHost_Product_Domain.dns2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setDns2(String dns2) { this.dns2 = dns2 == null ? null : dns2.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.emailstatus * * @return the value of FreeHost_Product_Domain.emailstatus * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getEmailstatus() { return emailstatus; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.emailstatus * * @param emailstatus the value for FreeHost_Product_Domain.emailstatus * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setEmailstatus(String emailstatus) { this.emailstatus = emailstatus == null ? null : emailstatus.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.istemplate * * @return the value of FreeHost_Product_Domain.istemplate * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getIstemplate() { return istemplate; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.istemplate * * @param istemplate the value for FreeHost_Product_Domain.istemplate * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setIstemplate(String istemplate) { this.istemplate = istemplate == null ? null : istemplate.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.NameServer1 * * @return the value of FreeHost_Product_Domain.NameServer1 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getNameserver1() { return nameserver1; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.NameServer1 * * @param nameserver1 the value for FreeHost_Product_Domain.NameServer1 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setNameserver1(String nameserver1) { this.nameserver1 = nameserver1 == null ? null : nameserver1.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.NameServer2 * * @return the value of FreeHost_Product_Domain.NameServer2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getNameserver2() { return nameserver2; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.NameServer2 * * @param nameserver2 the value for FreeHost_Product_Domain.NameServer2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setNameserver2(String nameserver2) { this.nameserver2 = nameserver2 == null ? null : nameserver2.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.OrganizationZH * * @return the value of FreeHost_Product_Domain.OrganizationZH * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getOrganizationzh() { return organizationzh; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.OrganizationZH * * @param organizationzh the value for FreeHost_Product_Domain.OrganizationZH * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setOrganizationzh(String organizationzh) { this.organizationzh = organizationzh == null ? null : organizationzh.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.OrganizationEN * * @return the value of FreeHost_Product_Domain.OrganizationEN * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getOrganizationen() { return organizationen; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.OrganizationEN * * @param organizationen the value for FreeHost_Product_Domain.OrganizationEN * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setOrganizationen(String organizationen) { this.organizationen = organizationen == null ? null : organizationen.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.StreetZH * * @return the value of FreeHost_Product_Domain.StreetZH * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getStreetzh() { return streetzh; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.StreetZH * * @param streetzh the value for FreeHost_Product_Domain.StreetZH * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setStreetzh(String streetzh) { this.streetzh = streetzh == null ? null : streetzh.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.StreetEN * * @return the value of FreeHost_Product_Domain.StreetEN * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getStreeten() { return streeten; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.StreetEN * * @param streeten the value for FreeHost_Product_Domain.StreetEN * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setStreeten(String streeten) { this.streeten = streeten == null ? null : streeten.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.CityZH * * @return the value of FreeHost_Product_Domain.CityZH * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getCityzh() { return cityzh; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.CityZH * * @param cityzh the value for FreeHost_Product_Domain.CityZH * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setCityzh(String cityzh) { this.cityzh = cityzh == null ? null : cityzh.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.CityEN * * @return the value of FreeHost_Product_Domain.CityEN * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getCityen() { return cityen; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.CityEN * * @param cityen the value for FreeHost_Product_Domain.CityEN * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setCityen(String cityen) { this.cityen = cityen == null ? null : cityen.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.Country * * @return the value of FreeHost_Product_Domain.Country * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getCountry() { return country; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.Country * * @param country the value for FreeHost_Product_Domain.Country * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setCountry(String country) { this.country = country == null ? null : country.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.Province * * @return the value of FreeHost_Product_Domain.Province * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getProvince() { return province; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.Province * * @param province the value for FreeHost_Product_Domain.Province * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setProvince(String province) { this.province = province == null ? null : province.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.Postcode * * @return the value of FreeHost_Product_Domain.Postcode * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getPostcode() { return postcode; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.Postcode * * @param postcode the value for FreeHost_Product_Domain.Postcode * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setPostcode(String postcode) { this.postcode = postcode == null ? null : postcode.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.NameZH * * @return the value of FreeHost_Product_Domain.NameZH * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getNamezh() { return namezh; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.NameZH * * @param namezh the value for FreeHost_Product_Domain.NameZH * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setNamezh(String namezh) { this.namezh = namezh == null ? null : namezh.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.NameEN * * @return the value of FreeHost_Product_Domain.NameEN * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getNameen() { return nameen; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.NameEN * * @param nameen the value for FreeHost_Product_Domain.NameEN * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setNameen(String nameen) { this.nameen = nameen == null ? null : nameen.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.PhoneRegionCode * * @return the value of FreeHost_Product_Domain.PhoneRegionCode * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getPhoneregioncode() { return phoneregioncode; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.PhoneRegionCode * * @param phoneregioncode the value for FreeHost_Product_Domain.PhoneRegionCode * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setPhoneregioncode(String phoneregioncode) { this.phoneregioncode = phoneregioncode == null ? null : phoneregioncode.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.PhoneAreaCode * * @return the value of FreeHost_Product_Domain.PhoneAreaCode * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getPhoneareacode() { return phoneareacode; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.PhoneAreaCode * * @param phoneareacode the value for FreeHost_Product_Domain.PhoneAreaCode * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setPhoneareacode(String phoneareacode) { this.phoneareacode = phoneareacode == null ? null : phoneareacode.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.PhoneNumber * * @return the value of FreeHost_Product_Domain.PhoneNumber * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getPhonenumber() { return phonenumber; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.PhoneNumber * * @param phonenumber the value for FreeHost_Product_Domain.PhoneNumber * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setPhonenumber(String phonenumber) { this.phonenumber = phonenumber == null ? null : phonenumber.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.PhoneExt * * @return the value of FreeHost_Product_Domain.PhoneExt * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getPhoneext() { return phoneext; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.PhoneExt * * @param phoneext the value for FreeHost_Product_Domain.PhoneExt * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setPhoneext(String phoneext) { this.phoneext = phoneext == null ? null : phoneext.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.FaxRegionCode * * @return the value of FreeHost_Product_Domain.FaxRegionCode * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getFaxregioncode() { return faxregioncode; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.FaxRegionCode * * @param faxregioncode the value for FreeHost_Product_Domain.FaxRegionCode * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setFaxregioncode(String faxregioncode) { this.faxregioncode = faxregioncode == null ? null : faxregioncode.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.FaxAreaCode * * @return the value of FreeHost_Product_Domain.FaxAreaCode * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getFaxareacode() { return faxareacode; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.FaxAreaCode * * @param faxareacode the value for FreeHost_Product_Domain.FaxAreaCode * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setFaxareacode(String faxareacode) { this.faxareacode = faxareacode == null ? null : faxareacode.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.FaxNumber * * @return the value of FreeHost_Product_Domain.FaxNumber * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getFaxnumber() { return faxnumber; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.FaxNumber * * @param faxnumber the value for FreeHost_Product_Domain.FaxNumber * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setFaxnumber(String faxnumber) { this.faxnumber = faxnumber == null ? null : faxnumber.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.FaxExt * * @return the value of FreeHost_Product_Domain.FaxExt * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getFaxext() { return faxext; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.FaxExt * * @param faxext the value for FreeHost_Product_Domain.FaxExt * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setFaxext(String faxext) { this.faxext = faxext == null ? null : faxext.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.Email * * @return the value of FreeHost_Product_Domain.Email * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getEmail() { return email; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.Email * * @param email the value for FreeHost_Product_Domain.Email * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setEmail(String email) { this.email = email == null ? null : email.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.Trade * * @return the value of FreeHost_Product_Domain.Trade * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getTrade() { return trade; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.Trade * * @param trade the value for FreeHost_Product_Domain.Trade * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setTrade(String trade) { this.trade = trade == null ? null : trade.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.Manager * * @return the value of FreeHost_Product_Domain.Manager * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getManager() { return manager; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.Manager * * @param manager the value for FreeHost_Product_Domain.Manager * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setManager(String manager) { this.manager = manager == null ? null : manager.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.OrganizationZH2 * * @return the value of FreeHost_Product_Domain.OrganizationZH2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getOrganizationzh2() { return organizationzh2; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.OrganizationZH2 * * @param organizationzh2 the value for FreeHost_Product_Domain.OrganizationZH2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setOrganizationzh2(String organizationzh2) { this.organizationzh2 = organizationzh2 == null ? null : organizationzh2.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.OrganizationEN2 * * @return the value of FreeHost_Product_Domain.OrganizationEN2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getOrganizationen2() { return organizationen2; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.OrganizationEN2 * * @param organizationen2 the value for FreeHost_Product_Domain.OrganizationEN2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setOrganizationen2(String organizationen2) { this.organizationen2 = organizationen2 == null ? null : organizationen2.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.StreetZH2 * * @return the value of FreeHost_Product_Domain.StreetZH2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getStreetzh2() { return streetzh2; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.StreetZH2 * * @param streetzh2 the value for FreeHost_Product_Domain.StreetZH2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setStreetzh2(String streetzh2) { this.streetzh2 = streetzh2 == null ? null : streetzh2.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.StreetEN2 * * @return the value of FreeHost_Product_Domain.StreetEN2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getStreeten2() { return streeten2; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.StreetEN2 * * @param streeten2 the value for FreeHost_Product_Domain.StreetEN2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setStreeten2(String streeten2) { this.streeten2 = streeten2 == null ? null : streeten2.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.CityZH2 * * @return the value of FreeHost_Product_Domain.CityZH2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getCityzh2() { return cityzh2; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.CityZH2 * * @param cityzh2 the value for FreeHost_Product_Domain.CityZH2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setCityzh2(String cityzh2) { this.cityzh2 = cityzh2 == null ? null : cityzh2.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.CityEN2 * * @return the value of FreeHost_Product_Domain.CityEN2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getCityen2() { return cityen2; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.CityEN2 * * @param cityen2 the value for FreeHost_Product_Domain.CityEN2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setCityen2(String cityen2) { this.cityen2 = cityen2 == null ? null : cityen2.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.Country2 * * @return the value of FreeHost_Product_Domain.Country2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getCountry2() { return country2; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.Country2 * * @param country2 the value for FreeHost_Product_Domain.Country2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setCountry2(String country2) { this.country2 = country2 == null ? null : country2.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.Province2 * * @return the value of FreeHost_Product_Domain.Province2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getProvince2() { return province2; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.Province2 * * @param province2 the value for FreeHost_Product_Domain.Province2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setProvince2(String province2) { this.province2 = province2 == null ? null : province2.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.Postcode2 * * @return the value of FreeHost_Product_Domain.Postcode2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getPostcode2() { return postcode2; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.Postcode2 * * @param postcode2 the value for FreeHost_Product_Domain.Postcode2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setPostcode2(String postcode2) { this.postcode2 = postcode2 == null ? null : postcode2.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.NameZH2 * * @return the value of FreeHost_Product_Domain.NameZH2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getNamezh2() { return namezh2; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.NameZH2 * * @param namezh2 the value for FreeHost_Product_Domain.NameZH2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setNamezh2(String namezh2) { this.namezh2 = namezh2 == null ? null : namezh2.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.NameEN2 * * @return the value of FreeHost_Product_Domain.NameEN2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getNameen2() { return nameen2; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.NameEN2 * * @param nameen2 the value for FreeHost_Product_Domain.NameEN2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setNameen2(String nameen2) { this.nameen2 = nameen2 == null ? null : nameen2.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.PhoneRegionCode2 * * @return the value of FreeHost_Product_Domain.PhoneRegionCode2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getPhoneregioncode2() { return phoneregioncode2; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.PhoneRegionCode2 * * @param phoneregioncode2 the value for FreeHost_Product_Domain.PhoneRegionCode2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setPhoneregioncode2(String phoneregioncode2) { this.phoneregioncode2 = phoneregioncode2 == null ? null : phoneregioncode2.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.PhoneAreaCode2 * * @return the value of FreeHost_Product_Domain.PhoneAreaCode2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getPhoneareacode2() { return phoneareacode2; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.PhoneAreaCode2 * * @param phoneareacode2 the value for FreeHost_Product_Domain.PhoneAreaCode2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setPhoneareacode2(String phoneareacode2) { this.phoneareacode2 = phoneareacode2 == null ? null : phoneareacode2.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.PhoneNumber2 * * @return the value of FreeHost_Product_Domain.PhoneNumber2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getPhonenumber2() { return phonenumber2; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.PhoneNumber2 * * @param phonenumber2 the value for FreeHost_Product_Domain.PhoneNumber2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setPhonenumber2(String phonenumber2) { this.phonenumber2 = phonenumber2 == null ? null : phonenumber2.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.PhoneExt2 * * @return the value of FreeHost_Product_Domain.PhoneExt2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getPhoneext2() { return phoneext2; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.PhoneExt2 * * @param phoneext2 the value for FreeHost_Product_Domain.PhoneExt2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setPhoneext2(String phoneext2) { this.phoneext2 = phoneext2 == null ? null : phoneext2.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.FaxRegionCode2 * * @return the value of FreeHost_Product_Domain.FaxRegionCode2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getFaxregioncode2() { return faxregioncode2; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.FaxRegionCode2 * * @param faxregioncode2 the value for FreeHost_Product_Domain.FaxRegionCode2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setFaxregioncode2(String faxregioncode2) { this.faxregioncode2 = faxregioncode2 == null ? null : faxregioncode2.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.FaxAreaCode2 * * @return the value of FreeHost_Product_Domain.FaxAreaCode2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getFaxareacode2() { return faxareacode2; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.FaxAreaCode2 * * @param faxareacode2 the value for FreeHost_Product_Domain.FaxAreaCode2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setFaxareacode2(String faxareacode2) { this.faxareacode2 = faxareacode2 == null ? null : faxareacode2.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.FaxNumber2 * * @return the value of FreeHost_Product_Domain.FaxNumber2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getFaxnumber2() { return faxnumber2; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.FaxNumber2 * * @param faxnumber2 the value for FreeHost_Product_Domain.FaxNumber2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setFaxnumber2(String faxnumber2) { this.faxnumber2 = faxnumber2 == null ? null : faxnumber2.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.FaxExt2 * * @return the value of FreeHost_Product_Domain.FaxExt2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getFaxext2() { return faxext2; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.FaxExt2 * * @param faxext2 the value for FreeHost_Product_Domain.FaxExt2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setFaxext2(String faxext2) { this.faxext2 = faxext2 == null ? null : faxext2.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.Email2 * * @return the value of FreeHost_Product_Domain.Email2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getEmail2() { return email2; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.Email2 * * @param email2 the value for FreeHost_Product_Domain.Email2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setEmail2(String email2) { this.email2 = email2 == null ? null : email2.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.Trade2 * * @return the value of FreeHost_Product_Domain.Trade2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getTrade2() { return trade2; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.Trade2 * * @param trade2 the value for FreeHost_Product_Domain.Trade2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setTrade2(String trade2) { this.trade2 = trade2 == null ? null : trade2.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.Manager2 * * @return the value of FreeHost_Product_Domain.Manager2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getManager2() { return manager2; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.Manager2 * * @param manager2 the value for FreeHost_Product_Domain.Manager2 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setManager2(String manager2) { this.manager2 = manager2 == null ? null : manager2.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.DomainComplex * * @return the value of FreeHost_Product_Domain.DomainComplex * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getDomaincomplex() { return domaincomplex; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.DomainComplex * * @param domaincomplex the value for FreeHost_Product_Domain.DomainComplex * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setDomaincomplex(String domaincomplex) { this.domaincomplex = domaincomplex == null ? null : domaincomplex.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.Encode * * @return the value of FreeHost_Product_Domain.Encode * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getEncode() { return encode; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.Encode * * @param encode the value for FreeHost_Product_Domain.Encode * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setEncode(String encode) { this.encode = encode == null ? null : encode.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.strCompanyCN * * @return the value of FreeHost_Product_Domain.strCompanyCN * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getStrcompanycn() { return strcompanycn; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.strCompanyCN * * @param strcompanycn the value for FreeHost_Product_Domain.strCompanyCN * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setStrcompanycn(String strcompanycn) { this.strcompanycn = strcompanycn == null ? null : strcompanycn.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.strCompanyEN * * @return the value of FreeHost_Product_Domain.strCompanyEN * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getStrcompanyen() { return strcompanyen; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.strCompanyEN * * @param strcompanyen the value for FreeHost_Product_Domain.strCompanyEN * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setStrcompanyen(String strcompanyen) { this.strcompanyen = strcompanyen == null ? null : strcompanyen.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.strAddressCN * * @return the value of FreeHost_Product_Domain.strAddressCN * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getStraddresscn() { return straddresscn; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.strAddressCN * * @param straddresscn the value for FreeHost_Product_Domain.strAddressCN * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setStraddresscn(String straddresscn) { this.straddresscn = straddresscn == null ? null : straddresscn.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.strAddressEN * * @return the value of FreeHost_Product_Domain.strAddressEN * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getStraddressen() { return straddressen; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.strAddressEN * * @param straddressen the value for FreeHost_Product_Domain.strAddressEN * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setStraddressen(String straddressen) { this.straddressen = straddressen == null ? null : straddressen.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.strCityCN * * @return the value of FreeHost_Product_Domain.strCityCN * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getStrcitycn() { return strcitycn; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.strCityCN * * @param strcitycn the value for FreeHost_Product_Domain.strCityCN * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setStrcitycn(String strcitycn) { this.strcitycn = strcitycn == null ? null : strcitycn.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.strCityEN * * @return the value of FreeHost_Product_Domain.strCityEN * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getStrcityen() { return strcityen; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.strCityEN * * @param strcityen the value for FreeHost_Product_Domain.strCityEN * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setStrcityen(String strcityen) { this.strcityen = strcityen == null ? null : strcityen.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.strProvince * * @return the value of FreeHost_Product_Domain.strProvince * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getStrprovince() { return strprovince; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.strProvince * * @param strprovince the value for FreeHost_Product_Domain.strProvince * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setStrprovince(String strprovince) { this.strprovince = strprovince == null ? null : strprovince.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.strPostcode * * @return the value of FreeHost_Product_Domain.strPostcode * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getStrpostcode() { return strpostcode; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.strPostcode * * @param strpostcode the value for FreeHost_Product_Domain.strPostcode * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setStrpostcode(String strpostcode) { this.strpostcode = strpostcode == null ? null : strpostcode.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.strNameCN * * @return the value of FreeHost_Product_Domain.strNameCN * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getStrnamecn() { return strnamecn; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.strNameCN * * @param strnamecn the value for FreeHost_Product_Domain.strNameCN * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setStrnamecn(String strnamecn) { this.strnamecn = strnamecn == null ? null : strnamecn.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.strNameEN * * @return the value of FreeHost_Product_Domain.strNameEN * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getStrnameen() { return strnameen; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.strNameEN * * @param strnameen the value for FreeHost_Product_Domain.strNameEN * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setStrnameen(String strnameen) { this.strnameen = strnameen == null ? null : strnameen.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.intPhoneAreaCode * * @return the value of FreeHost_Product_Domain.intPhoneAreaCode * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getIntphoneareacode() { return intphoneareacode; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.intPhoneAreaCode * * @param intphoneareacode the value for FreeHost_Product_Domain.intPhoneAreaCode * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setIntphoneareacode(String intphoneareacode) { this.intphoneareacode = intphoneareacode == null ? null : intphoneareacode.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.intPhoneNumber * * @return the value of FreeHost_Product_Domain.intPhoneNumber * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getIntphonenumber() { return intphonenumber; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.intPhoneNumber * * @param intphonenumber the value for FreeHost_Product_Domain.intPhoneNumber * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setIntphonenumber(String intphonenumber) { this.intphonenumber = intphonenumber == null ? null : intphonenumber.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.intFaxAreaCode * * @return the value of FreeHost_Product_Domain.intFaxAreaCode * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getIntfaxareacode() { return intfaxareacode; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.intFaxAreaCode * * @param intfaxareacode the value for FreeHost_Product_Domain.intFaxAreaCode * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setIntfaxareacode(String intfaxareacode) { this.intfaxareacode = intfaxareacode == null ? null : intfaxareacode.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.intFaxNumber * * @return the value of FreeHost_Product_Domain.intFaxNumber * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getIntfaxnumber() { return intfaxnumber; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.intFaxNumber * * @param intfaxnumber the value for FreeHost_Product_Domain.intFaxNumber * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setIntfaxnumber(String intfaxnumber) { this.intfaxnumber = intfaxnumber == null ? null : intfaxnumber.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.strEmail * * @return the value of FreeHost_Product_Domain.strEmail * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getStremail() { return stremail; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.strEmail * * @param stremail the value for FreeHost_Product_Domain.strEmail * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setStremail(String stremail) { this.stremail = stremail == null ? null : stremail.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.strTrade * * @return the value of FreeHost_Product_Domain.strTrade * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getStrtrade() { return strtrade; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.strTrade * * @param strtrade the value for FreeHost_Product_Domain.strTrade * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setStrtrade(String strtrade) { this.strtrade = strtrade == null ? null : strtrade.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.strManager * * @return the value of FreeHost_Product_Domain.strManager * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getStrmanager() { return strmanager; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.strManager * * @param strmanager the value for FreeHost_Product_Domain.strManager * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setStrmanager(String strmanager) { this.strmanager = strmanager == null ? null : strmanager.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.kefu * * @return the value of FreeHost_Product_Domain.kefu * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getKefu() { return kefu; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.kefu * * @param kefu the value for FreeHost_Product_Domain.kefu * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setKefu(String kefu) { this.kefu = kefu == null ? null : kefu.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.realmoney * * @return the value of FreeHost_Product_Domain.realmoney * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public BigDecimal getRealmoney() { return realmoney; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.realmoney * * @param realmoney the value for FreeHost_Product_Domain.realmoney * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setRealmoney(BigDecimal realmoney) { this.realmoney = realmoney; } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.smsstatus * * @return the value of FreeHost_Product_Domain.smsstatus * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getSmsstatus() { return smsstatus; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.smsstatus * * @param smsstatus the value for FreeHost_Product_Domain.smsstatus * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setSmsstatus(String smsstatus) { this.smsstatus = smsstatus == null ? null : smsstatus.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.type1 * * @return the value of FreeHost_Product_Domain.type1 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public Integer getType1() { return type1; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.type1 * * @param type1 the value for FreeHost_Product_Domain.type1 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setType1(Integer type1) { this.type1 = type1; } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.DNScount * * @return the value of FreeHost_Product_Domain.DNScount * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public Integer getDnscount() { return dnscount; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.DNScount * * @param dnscount the value for FreeHost_Product_Domain.DNScount * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setDnscount(Integer dnscount) { this.dnscount = dnscount; } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.api7select * * @return the value of FreeHost_Product_Domain.api7select * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public Integer getApi7select() { return api7select; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.api7select * * @param api7select the value for FreeHost_Product_Domain.api7select * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setApi7select(Integer api7select) { this.api7select = api7select; } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.dns3 * * @return the value of FreeHost_Product_Domain.dns3 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getDns3() { return dns3; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.dns3 * * @param dns3 the value for FreeHost_Product_Domain.dns3 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setDns3(String dns3) { this.dns3 = dns3 == null ? null : dns3.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.dns4 * * @return the value of FreeHost_Product_Domain.dns4 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getDns4() { return dns4; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.dns4 * * @param dns4 the value for FreeHost_Product_Domain.dns4 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setDns4(String dns4) { this.dns4 = dns4 == null ? null : dns4.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.dns5 * * @return the value of FreeHost_Product_Domain.dns5 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getDns5() { return dns5; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.dns5 * * @param dns5 the value for FreeHost_Product_Domain.dns5 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setDns5(String dns5) { this.dns5 = dns5 == null ? null : dns5.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.dns6 * * @return the value of FreeHost_Product_Domain.dns6 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getDns6() { return dns6; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.dns6 * * @param dns6 the value for FreeHost_Product_Domain.dns6 * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setDns6(String dns6) { this.dns6 = dns6 == null ? null : dns6.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column FreeHost_Product_Domain.realnameID * * @return the value of FreeHost_Product_Domain.realnameID * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public String getRealnameid() { return realnameid; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column FreeHost_Product_Domain.realnameID * * @param realnameid the value for FreeHost_Product_Domain.realnameID * * @mbg.generated Fri May 11 11:16:07 CST 2018 */ public void setRealnameid(String realnameid) { this.realnameid = realnameid == null ? null : realnameid.trim(); } }
package com.tt.miniapp.msg.game; import android.app.Application; import android.content.Context; import android.content.res.Resources; import com.tt.miniapp.msg.sync.SyncMsgCtrl; import com.tt.miniapp.util.DevicesUtil; import com.tt.miniapphost.AppBrandLogger; import com.tt.miniapphost.AppbrandApplication; import com.tt.miniapphost.AppbrandContext; import com.tt.miniapphost.util.UIUtils; import org.json.JSONException; import org.json.JSONObject; public class ApiMenuButtonBoundingCtrl extends SyncMsgCtrl { public ApiMenuButtonBoundingCtrl(String paramString) { super(paramString); } private String calcPosAndSize() { Application application = AppbrandContext.getInst().getApplicationContext(); Resources resources = application.getResources(); int n = resources.getDimensionPixelSize(2097414151); int j = resources.getDimensionPixelSize(2097414149); int k = resources.getDimensionPixelSize(2097414152); int m = resources.getDimensionPixelSize(2097414150); if (AppbrandApplication.getInst().getAppInfo().isGame()) { i = UIUtils.getTitleBarHeight((Context)application, (AppbrandApplication.getInst().getAppInfo()).isLandScape); } else { i = UIUtils.getTitleBarHeight((Context)application, false); } int i = i - n + (n - j) / 2; m = DevicesUtil.getScreenWidth((Context)application) - m; return makeMsg(UIUtils.px2dip((Context)application, k), UIUtils.px2dip((Context)application, j), UIUtils.px2dip((Context)application, i), UIUtils.px2dip((Context)application, m), UIUtils.px2dip((Context)application, (i + j)), UIUtils.px2dip((Context)application, (m - k))); } private String makeMsg(int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6) { try { JSONObject jSONObject = new JSONObject(); jSONObject.put("width", paramInt1); jSONObject.put("height", paramInt2); jSONObject.put("top", paramInt3); jSONObject.put("bottom", paramInt5); jSONObject.put("right", paramInt4); jSONObject.put("left", paramInt6); return makeOkMsg(jSONObject); } catch (JSONException jSONException) { AppBrandLogger.e("tma_ApiMenuButtonBoundingCtrl", new Object[] { jSONException }); return makeFailMsg((Throwable)jSONException); } } public String act() { String str = calcPosAndSize(); StringBuilder stringBuilder = new StringBuilder("result: "); stringBuilder.append(str); AppBrandLogger.i("tma_ApiMenuButtonBoundingCtrl", new Object[] { stringBuilder.toString() }); return str; } public String getName() { return "getMenuButtonBoundingClientRect"; } } /* Location: C:\Users\august\Desktop\tik\df_miniapp\classes.jar!\com\tt\miniapp\msg\game\ApiMenuButtonBoundingCtrl.class * Java compiler version: 6 (50.0) * JD-Core Version: 1.1.3 */
import java.awt.Color; import java.awt.Dimension; import java.awt.Font; import java.awt.event.*; import javax.swing.*; public class IDVerificationUI extends JFrame { JFrame idVerification; JLabel title; JTextField idField; JPasswordField passwordField; JLabel idLabel; JLabel passwordLabel; JButton loginbtn; IDVerificationUI(){ idVerification=new JFrame("Stadtplan-Goslar"); title=new JLabel("ID-Verifikation"); title.setBounds(180,20,450,300); title.setVerticalAlignment(JLabel.TOP); title.setFont(new Font("Verdana", Font.PLAIN, 25)); title.setPreferredSize(new Dimension(250, 100)); title.setForeground(Color.blue); idLabel=new JLabel("ID-Nummer"); idLabel.setBounds(50,70,250,50); idField=new JTextField(); idField.setBounds(150,80,250,30); passwordLabel=new JLabel("Passwort"); passwordLabel.setBounds(50,120,250,50);; passwordField=new JPasswordField(); passwordField.setBounds(150,130,250,30); loginbtn=new JButton("Einloggen"); loginbtn.setBounds(240,270,100,30); idVerification.add(title); idVerification.add(idLabel); idVerification.add(idField); idVerification.add(passwordLabel); idVerification.add(passwordField); idVerification.add(loginbtn); ReportAccidentUI reportaccidentui = new ReportAccidentUI(); loginbtn.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e) { reportaccidentui.reportAccident.setVisible(true); idVerification.dispose(); } }); idVerification.setSize(600,400);//600 width and 400 height idVerification.setLayout(null); idVerification.setVisible(true); } public static void main(String[] args) { new IDVerificationUI(); } }
package pedestrian; public class Pedestrian { }
package com.cnk.travelogix.custom.so.createchange; import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebResult; import javax.jws.WebService; import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.ws.RequestWrapper; import javax.xml.ws.ResponseWrapper; /** * This class was generated by the JAX-WS RI. * JAX-WS RI 2.2.9-b130926.1035 * Generated source version: 2.2 * */ @WebService(name = "ZIF_ERP_WS_SO_CREATE_CHANGE", targetNamespace = "urn:sap-com:document:sap:rfc:functions") @XmlSeeAlso({ ObjectFactory.class }) public interface ZIFERPWSSOCREATECHANGE { /** * * @param soPartners * @param soItems * @param soConditions * @param soHeader * @return * returns com.cnk.travelogix.custom.order.createupdate.ZttTerpSoStatus */ @WebMethod(operationName = "ZifTerpSalesOrder") @WebResult(name = "Status", targetNamespace = "") @RequestWrapper(localName = "ZifTerpSalesOrder", targetNamespace = "urn:sap-com:document:sap:rfc:functions", className = "com.cnk.travelogix.custom.order.createupdate.ZifTerpSalesOrder") @ResponseWrapper(localName = "ZifTerpSalesOrderResponse", targetNamespace = "urn:sap-com:document:sap:rfc:functions", className = "com.cnk.travelogix.custom.order.createupdate.ZifTerpSalesOrderResponse") public ZttTerpSoStatus zifTerpSalesOrder( @WebParam(name = "SoConditions", targetNamespace = "") ZttTerpSoConditions soConditions, @WebParam(name = "SoHeader", targetNamespace = "") ZifTerpSoHeader soHeader, @WebParam(name = "SoItems", targetNamespace = "") ZttTerpSoItemData soItems, @WebParam(name = "SoPartners", targetNamespace = "") ZttTerpSoPartners soPartners); }
package com.tencent.tinker.c.a.a.a; import com.tencent.tinker.a.a.b; import com.tencent.tinker.a.a.i; import com.tencent.tinker.a.a.i$e; import com.tencent.tinker.a.a.t.a; public final class c extends i<b> { private a vqC = null; private i$e vqD = null; protected final /* synthetic */ Comparable a(com.tencent.tinker.a.a.a.a aVar) { return aVar.cGy(); } protected final /* synthetic */ Comparable a(com.tencent.tinker.c.a.c.a aVar, Comparable comparable) { b bVar = (b) comparable; int length = bVar.voe.length; int[] iArr = new int[length]; for (int i = 0; i < length; i++) { iArr[i] = aVar.Ia(bVar.voe[i]); } return new b(bVar.off, iArr); } protected final /* synthetic */ int e(Comparable comparable) { b bVar = (b) comparable; a aVar = this.vqC; aVar.size++; return this.vqD.a(bVar); } public c(com.tencent.tinker.c.a.b.a aVar, i iVar, i iVar2, com.tencent.tinker.c.a.c.c cVar) { super(aVar, iVar, cVar); if (iVar2 != null) { this.vqC = iVar2.voQ.vpu; this.vqD = iVar2.a(this.vqC); } } protected final a c(i iVar) { return iVar.voQ.vpu; } protected final void a(com.tencent.tinker.c.a.c.c cVar, int i, int i2, int i3, int i4) { if (i2 != i4) { cVar.vrM.put(i2, i4); } } protected final void a(com.tencent.tinker.c.a.c.c cVar, int i, int i2) { if (i2 >= 0) { cVar.vsa.HR(i2); } } }
package newfutures; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.function.Consumer; /** * Created by ypl on 17-4-27. */ public class TestNewFutures { public static void test1(){ List<Integer> iList = Arrays.asList(3,1,2,5,6); List<Integer> i = new ArrayList<Integer>(); iList.forEach(new Consumer<Integer>() { @Override public void accept(Integer integer) { i.add(integer); } } ); for(Integer ii : i){ System.out.println(ii); } } public static void test2(){ List<String> list = new ArrayList<>(); for(int i=0;i<10;i++){ list.add(new Integer((i)).toString()); } System.out.println(list.subList(3,5).toString()); } public static void test3(){ List<String> list = new ArrayList<>(); for(int i=0;i<10;i++){ list.add(new Integer((i)).toString()); } String s = list.get(1)+list.get(2); System.out.println("s:"+s); System.out.println("list:"+list.toString()); } public static void main(String[] args){ //test1(); test3(); } }
package com.atn.app.webservices; public interface PromotionReedemWebServiceListener { public abstract void onFailed(int errorCode, String errorMessage); public abstract void onSuccess(String message); }
package com.carousell.marketplace.error; /** * @author faizanmalik * creation date 3/5/20 */ public enum ErrorType { UNKNOWN_USER_MESSAGE("Error - unknown user"), DUPLICATE_USER_MESSAGE("Error - user already existing"), LISTING_NOT_FOUND_MESSAGE("Error - listing does not exist"), LISTING_OWNER_MISMATCH_MESSAGE("Error - listing owner mismatch"), NOT_FOUND_MESSAGE("Error - not found"), CATEGORY_NOT_FOUND_MESSAGE("Error - category not found"); private String message; ErrorType(String message) { this.message = message; } public String getMessage() { return message; } }
package view; import javafx.scene.Node; import javafx.scene.layout.*; import javafx.scene.paint.Color; import java.util.Set; import model.*; import resources.Constants; import static resources.Constants.*; public class BoardView extends GridPane { private Board gameBoard; private TileView[][] boardView; public BoardView(Board gameBoard) { super(); this.gameBoard = gameBoard; this.setPrefSize(gameBoard.getSize() * TILE_SIZE, gameBoard.getSize() * TILE_SIZE); initialiseBoardView(); } private void initialiseBoardView() { boardView = new TileView[gameBoard.getSize()][gameBoard.getSize() ]; AddTileViewsToBoard(boardView); } private void AddTileViewsToBoard(TileView[][] board){ for (Tile[] tileArr : gameBoard.getBoard()) { for (Tile tile : tileArr) { int x = tile.getX(); int y = tile.getY(); TileView tileView = new TileView(tile); tileView.setSprite(); tileView.setHP(); board[x][y] = tileView; GridPane.setRowIndex(tileView, x); GridPane.setColumnIndex(tileView, y); this.getChildren().addAll(tileView); } } } public TileView[][] RestoreTileView(){ this.getChildren().removeAll(this.getChildren()); TileView[][] tileViews = new TileView[gameBoard.getSize()][gameBoard.getSize()]; AddTileViewsToBoard(tileViews); return tileViews; } public void refreshBoard() { for (Tile[] tileArr : gameBoard.getBoard()) { for (Tile tile : tileArr) { int x = tile.getX(); int y = tile.getY(); boardView[x][y].setSprite(); boardView[x][y].setHP(); } } gameBoard.printBoard(); } public void highlightTiles(Set<Tile> tiles, Color color) { for (Tile t : tiles) { TileView selectedTile; int validX = t.getX(); int validY = t.getY(); for (Node node : this.getChildren()) { if (GridPane.getRowIndex(node) == validX && GridPane.getColumnIndex(node) == validY) { selectedTile = (TileView) node; selectedTile.setTileBackgroundColor(color); } } } } public void setBoard(Board board){ this.gameBoard=board; } public void setBoardView(TileView[][] boardView){ this.boardView=boardView; } }
/*-------------------------*/ /* DO NOT DELETE THIS TEST */ /*-------------------------*/ package edu.wpi.teamname; import static org.junit.jupiter.api.Assertions.assertEquals; import org.junit.jupiter.api.Test; public class DefaultTest { @Test public void testRectanglePerimeter() { Rectangle rec = new Rectangle(20, 30); double calculated = (20 * 2) + (30 * 2); assertEquals(calculated, rec.getPerimeter(), "Should be equal"); } @Test public void testRectangleArea() { Rectangle rec = new Rectangle(20, 30); double calculated = 20 * 30; assertEquals(calculated, rec.getArea(), "Should be equal"); } @Test public void testCirclePerimeter() { Circle circle = new Circle(5); double calculated = 5 * 2 * Math.PI; assertEquals(calculated, circle.getPerimeter(), "Should be equal"); } @Test public void testCircleArea() { Circle circle = new Circle(3); double calculated = Math.pow(3, 2) * Math.PI; assertEquals(calculated, circle.getArea(), "Should be equal"); } @Test public void testFizz() { FizzBuzz buzz = new FizzBuzz(); assertEquals("fizz", buzz.answer(6), "Should return fizz"); } @Test public void testBuzz() { FizzBuzz buzz = new FizzBuzz(); assertEquals("buzz", buzz.answer(20), "Should return buzz"); } @Test public void testFizzBuzz() { FizzBuzz buzz = new FizzBuzz(); assertEquals("fizzbuzz", buzz.answer(15), "Should return fizzbuzz"); } @Test public void testFizzBuzzString() { FizzBuzz buzz = new FizzBuzz(); assertEquals("13", buzz.answer(13), "Should return 13"); } @Test public void testWiz() { FizzBuzzWhiz buzz = new FizzBuzzWhiz(); assertEquals("whiz", buzz.answer(17), "Should return wiz"); } }
package com.tencent.mm.plugin.wallet.pwd; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; import com.tencent.mm.wallet_core.ui.WalletBaseUI; class a$5 implements OnClickListener { final /* synthetic */ WalletBaseUI peV; final /* synthetic */ a phb; a$5(a aVar, WalletBaseUI walletBaseUI) { this.phb = aVar; this.peV = walletBaseUI; } public final void onClick(DialogInterface dialogInterface, int i) { this.phb.b(this.peV, a.g(this.phb)); if (this.peV.bbR()) { this.peV.finish(); } WalletBaseUI.cDI(); } }
package com.dao; import java.util.List; import java.util.Map; import org.apache.ibatis.annotations.Mapper; import com.entity.Curriculum; import com.entity.Language; @Mapper public interface LanguageDao { // 查询所有语言分类 public List<Language> queryAll(); // 修改语言分类 public void upd(Language l); // 删除语言分类 public void del(Integer l_id); // 添加语言分类 public void add(Language l); // 根据语言查询所有课程 public List<Curriculum> queryByLanguage(String l_name, Integer c_vip, Integer c_level); // 分页查询所有语言信息 public List<Language> queryLanguage(Integer page, Integer limit); // 查询某个技术方向的所有语言分类 public List<Language> queryByD_id(Integer d_id); // 查询 public List<Map<String, Object>> SelectByD_id(Integer page, Integer limit); }
package com.thinking.machines.loyalty.dao; import java.util.*; import java.sql.*; import com.thinking.machines.loyalty.interfaces.*; import com.thinking.machines.loyalty.exceptions.*; public class CityDAO implements CityDAOInterface { public void add(CityInterface cityInterface) throws DAOException { try { if(existsByName(cityInterface.getName())) { throw new DAOException("CityDAO : add()" +cityInterface.getName()+" already exists"); } Connection connection=DAOConnection.getConnection(); String job="{ call add_city(?,?,?,?) }"; CallableStatement callableStatement=connection.prepareCall(job); callableStatement.setString(1,cityInterface.getName()); callableStatement.setString(2,cityInterface.getState()); callableStatement.setString(3,cityInterface.getCountry()); callableStatement.registerOutParameter(4, java.sql.Types.INTEGER); callableStatement.execute(); //int code=callableStatement.getInt(4); callableStatement.close(); //System.out.println(code); connection.close(); } catch(Exception exception) { throw new DAOException("CityDAO --> add() --> "+exception.getMessage()); } } public void update(CityInterface cityInterface) throws DAOException { try { if(!exists(cityInterface.getCode())) { throw new DAOException("CityDAO : update() --> Invalid City Code :"+cityInterface.getCode()); } if(getCountByName(cityInterface.getName())>1) { throw new DAOException("CityDAO : update() --> City Already Exists"); } Connection connection=DAOConnection.getConnection(); String job="{ call update_city(?,?,?,?) }"; CallableStatement callableStatement=connection.prepareCall(job); callableStatement.setInt(1,cityInterface.getCode()); callableStatement.setString(2,cityInterface.getName()); callableStatement.setString(3,cityInterface.getState()); callableStatement.setString(4,cityInterface.getCountry()); callableStatement.execute(); callableStatement.close(); connection.close(); } catch(Exception exception) { throw new DAOException("CityDAO --> update() --> "+exception.getMessage()); } } public CityInterface getByPrimaryKey(int code) throws DAOException { try { Connection connection=DAOConnection.getConnection(); String job="{ call get_city_by_primary_key(?) }"; CallableStatement callableStatement=connection.prepareCall(job); callableStatement.setInt(1,code); boolean resultGenerated=callableStatement.execute(); if(!resultGenerated) { callableStatement.close(); connection.close(); throw new DAOException("CityDAO : getByPrimaryKey() --> No ResultSet object"); } ResultSet resultSet=callableStatement.getResultSet(); if(resultSet.next()==false) { resultSet.close(); callableStatement.close(); connection.close(); throw new DAOException("CityDAO : getByPrimaryKey() --> Invalid Code "+code); } CityInterface cityInterface=new City(); cityInterface.setCode(resultSet.getInt("code")); cityInterface.setName(resultSet.getString("name").trim()); cityInterface.setState(resultSet.getString("state").trim()); cityInterface.setCountry(resultSet.getString("country").trim()); callableStatement.close(); connection.close(); return cityInterface; } catch(Exception exception) { throw new DAOException("CityDAO --> getByPrimaryKey() --> "+exception.getMessage()); } } public CityInterface getByName(String name) throws DAOException { try { Connection connection=DAOConnection.getConnection(); String job="{ call get_city_by_name(?) }"; CallableStatement callableStatement=connection.prepareCall(job); callableStatement.setString(1,name); boolean resultGenerated=callableStatement.execute(); if(!resultGenerated) { callableStatement.close(); connection.close(); throw new DAOException("CityDAO : getByName() --> No ResultSet object"); } ResultSet resultSet=callableStatement.getResultSet(); if(resultSet.next()==false) { resultSet.close(); callableStatement.close(); connection.close(); throw new DAOException("CityDAO : getByName() --> Invalid Name "+name); } CityInterface cityInterface=new City(); cityInterface.setCode(resultSet.getInt("code")); cityInterface.setName(resultSet.getString("name").trim()); cityInterface.setState(resultSet.getString("state").trim()); cityInterface.setCountry(resultSet.getString("country").trim()); callableStatement.close(); connection.close(); return cityInterface; } catch(Exception exception) { throw new DAOException("CityDAO --> getByName() --> "+exception.getMessage()); } } public ArrayList<CityInterface> getAll() throws DAOException { try { Connection connection=DAOConnection.getConnection(); String job="{ call get_all_cities() }"; CallableStatement callableStatement=connection.prepareCall(job); boolean resultGenerated=callableStatement.execute(); if(!resultGenerated) { callableStatement.close(); connection.close(); throw new DAOException("CityDAO : getAll() --> No ResultSet object"); } ResultSet resultSet=callableStatement.getResultSet(); if(resultSet.next()==false) { resultSet.close(); callableStatement.close(); connection.close(); throw new DAOException("CityDAO : getAll() --> No records "); } ArrayList<CityInterface> cities; cities=new ArrayList<CityInterface>(); CityInterface cityInterface; do { cityInterface=new City(); cityInterface.setCode(resultSet.getInt("code")); cityInterface.setName(resultSet.getString("name").trim()); cityInterface.setState(resultSet.getString("state").trim()); cityInterface.setCountry(resultSet.getString("country").trim()); cities.add(cityInterface); }while(resultSet.next()); resultSet.close(); connection.close(); return cities; }catch(SQLException sqlException) { throw new DAOException("CityDAO : getAll() --> "+sqlException.getMessage()); } catch(Exception exception) { throw new DAOException("CityDAO : getAll() --> "+exception.getMessage()); } } public int getCountByName(String name) throws DAOException { try { Connection connection=DAOConnection.getConnection(); String job="{ call get_city_count_by_name(?,?) }"; CallableStatement callableStatement=connection.prepareCall(job); callableStatement.setString(1,name); callableStatement.registerOutParameter(2, java.sql.Types.INTEGER); callableStatement.execute(); int count=callableStatement.getInt(2); callableStatement.close(); connection.close(); return count; } catch(Exception exception) { throw new DAOException("CityDAO --> getCountByName() --> "+exception.getMessage()); } } public boolean exists(int code) throws DAOException { try { boolean exists=false; Connection connection=DAOConnection.getConnection(); String job="{ call city_exists_by_primary_key(?) }"; CallableStatement callableStatement=connection.prepareCall(job); callableStatement.setInt(1,code); boolean resultGenerated=callableStatement.execute(); if(!resultGenerated) { callableStatement.close(); connection.close(); throw new DAOException("exists() --> No records in generated result"); } ResultSet resultSet=callableStatement.getResultSet(); exists=resultSet.next(); resultSet.close(); callableStatement.close(); return exists; } catch(Exception exception) { throw new DAOException("CityDAO --> exists() --> "+exception.getMessage()); } } public long getCount() throws DAOException { try { Connection connection=DAOConnection.getConnection(); String job="{ call get_city_count(?) }"; CallableStatement callableStatement=connection.prepareCall(job); callableStatement.registerOutParameter(1, java.sql.Types.INTEGER); callableStatement.execute(); long count=callableStatement.getInt(1); callableStatement.close(); connection.close(); return count; } catch(Exception exception) { throw new DAOException("CityDAO --> getCount() --> "+exception.getMessage()); } } public boolean existsByName(String name) throws DAOException { try { boolean exists=false; Connection connection=DAOConnection.getConnection(); String job="{ call city_exists_by_name(?) }"; CallableStatement callableStatement=connection.prepareCall(job); callableStatement.setString(1,name); boolean resultGenerated=callableStatement.execute(); if(!resultGenerated) { callableStatement.close(); connection.close(); throw new DAOException("existsByName() --> No records in generated result"); } ResultSet resultSet=callableStatement.getResultSet(); exists=resultSet.next(); resultSet.close(); callableStatement.close(); return exists; } catch(Exception exception) { throw new DAOException("CityDAO --> existsByName() --> "+exception.getMessage()); } } public void removeAll() throws DAOException { try { /* Connection connection=DAOConnection.getConnection(); String job="{ call remove_all_cities() }"; CallableStatement callableStatement=connection.prepareCall(job); callableStatement.execute(); callableStatement.close(); connection.close(); */ } catch(Exception exception) { throw new DAOException("CityDAO --> removeAll() --> "+exception.getMessage()); } } public void remove(int code) throws DAOException { } public void removeByName(String name) throws DAOException { } }
package edunova; public class OsobaI extends Osoba{ @Override public void pozdravi() { // TODO Auto-generated method stub } }
package hibernate.jpa.daoClass; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.util.List; import javax.persistence.EntityManager; public abstract class AbstractDao<T> { private EntityManager entityManager; private Class<T> entityClass; public AbstractDao(EntityManager entityManager) { this.entityManager = entityManager; entityClass = getEntityClass(); } public EntityManager getEntityManager() { return entityManager; } @SuppressWarnings("unchecked") protected final Class<T> getEntityClass() { final Type type = getClass().getGenericSuperclass() instanceof ParameterizedType ? getClass().getGenericSuperclass() : getClass().getSuperclass().getGenericSuperclass(); if (type instanceof ParameterizedType) { final ParameterizedType paramType = (ParameterizedType) type; return (Class<T>) paramType.getActualTypeArguments()[0]; } else throw new IllegalArgumentException("Could not guess entity class by reflection"); } public void create(T object) { entityManager.persist(object); } public void remove(T object) { entityManager.remove(object); } public T update(T object) { return entityManager.merge(object); } @SuppressWarnings("unchecked") public List<T> selectAll() { return entityManager.createQuery("from " + entityClass.getName()).getResultList(); } public T findById(int id) { return (T) entityManager.find(getEntityClass(), id); } @SuppressWarnings("unchecked") public T findByBrand(String brand) { return (T) getEntityManager().createQuery("select a from " + entityClass.getName() + " a where a.brand like :brand") .setParameter("brand", "%" + brand + "%").getResultList(); } @SuppressWarnings("unchecked") public T findByDescription(String description) { return (T) getEntityManager().createQuery("select a from " + entityClass.getName() + " a where a.description like :description") .setParameter("description", "%" + description + "%").getResultList(); } @SuppressWarnings("unchecked") public T findByPrice(int price) { return (T) getEntityManager().createQuery("select a from " + entityClass.getName() + " a where a.price = :price") .setParameter("price", price).getResultList(); } }
package com.example.lenovo.medleybranch; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; public class item_category extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_item_category); } }
package com.translator.application.test.doubles; import com.translator.application.Console; import java.util.ArrayList; import java.util.List; public class ConsoleSpy implements Console { public List<String> outputsWritten; public ConsoleSpy() { this.outputsWritten = new ArrayList<String>(); } public void write(String output) { outputsWritten.add(output); } }
import org.apache.commons.codec.digest.DigestUtils; /** * Description:MD5测试类 */ public class MD5Test{ public static void main(String[] args) { String keyword="123"; String md5= DigestUtils.md5Hex(keyword); System.out.println("md5加密后:"+"\n"+md5); String md5salt= MD5.md5PlusSalt(keyword); System.out.println("加盐后:"+"\n"+md5salt); String word= MD5.md5MinusSalt(md5salt); System.out.println("解密后:"+"\n"+word); boolean matches = md5.matches(word); System.out.println(matches); } }
import java.util.Map; /** * Created by rai on 19.05.17. */ public class Zeichner { public void zeichne(Map<Ort, Markierung> brett) { for(Markierung markierung : brett.values()) { zeichneMarkierung(markierung); } } public void zeigeEndbericht(Markierung markierung) { System.out.println(markierung.toString() + " hat gewonnen"); } private void zeichneMarkierung(Markierung markierung) { // TODO pretty paint... if (markierung == Markierung.BLANK) { System.out.println("-"); } if (markierung == Markierung.X) { System.out.println("X"); } if (markierung == Markierung.O) { System.out.println("O"); } } }
package com.takshine.wxcrm.base.util; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.UnsupportedEncodingException; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.security.AccessController; import java.security.PrivilegedAction; import java.util.Enumeration; import java.util.Hashtable; import java.util.Properties; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogConfigurationException; public abstract class LogFactory { protected LogFactory() { } public abstract Object getAttribute(String s); public abstract String[] getAttributeNames(); public abstract Log getInstance(Class class1) throws LogConfigurationException; public abstract Log getInstance(String s) throws LogConfigurationException; public abstract void release(); public abstract void removeAttribute(String s); public abstract void setAttribute(String s, Object obj); public static LogFactory getFactory() throws LogConfigurationException { ClassLoader contextClassLoader = (ClassLoader) AccessController .doPrivileged(new PrivilegedAction() { public Object run() { return LogFactory.getContextClassLoader(); } }); LogFactory factory = getCachedFactory(contextClassLoader); if (factory != null) return factory; Properties props = null; try { InputStream stream = getResourceAsStream(contextClassLoader, "commons-logging.properties"); if (stream != null) { props = new Properties(); props.load(stream); stream.close(); } } catch (IOException e) { } catch (SecurityException e) { } try { String factoryClass = System .getProperty("org.apache.commons.logging.LogFactory"); if (factoryClass != null) factory = newFactory(factoryClass, contextClassLoader); } catch (SecurityException e) { } if (factory == null) try { InputStream is = getResourceAsStream(contextClassLoader, "META-INF/services/org.apache.commons.logging.LogFactory"); if (is != null) { BufferedReader rd; try { rd = new BufferedReader(new InputStreamReader(is, "UTF-8")); } catch (UnsupportedEncodingException e) { rd = new BufferedReader(new InputStreamReader(is)); } String factoryClassName = rd.readLine(); rd.close(); if (factoryClassName != null && !"".equals(factoryClassName)) factory = newFactory(factoryClassName, contextClassLoader); } } catch (Exception ex) { } if (factory == null && props != null) { String factoryClass = props .getProperty("org.apache.commons.logging.LogFactory"); if (factoryClass != null) factory = newFactory(factoryClass, contextClassLoader); } if (factory == null) factory = newFactory( "org.apache.commons.logging.impl.LogFactoryImpl", (org.apache.commons.logging.LogFactory.class) .getClassLoader()); if (factory != null) { cacheFactory(contextClassLoader, factory); if (props != null) { String name; String value; for (Enumeration names = props.propertyNames(); names .hasMoreElements(); factory.setAttribute(name, value)) { name = (String) names.nextElement(); value = props.getProperty(name); } } } return factory; } public static Log getLog(Class clazz) throws LogConfigurationException { return getFactory().getInstance(clazz); } public static Log getLog(String name) throws LogConfigurationException { return getFactory().getInstance(name); } public static void release(ClassLoader classLoader) { synchronized (factories) { LogFactory factory = (LogFactory) factories.get(classLoader); if (factory != null) { factory.release(); factories.remove(classLoader); } } } public static void releaseAll() { synchronized (factories) { LogFactory element; for (Enumeration elements = factories.elements(); elements .hasMoreElements(); element.release()) element = (LogFactory) elements.nextElement(); factories.clear(); } } protected static ClassLoader getContextClassLoader() throws LogConfigurationException { ClassLoader classLoader = null; try { Method method = (java.lang.Thread.class).getMethod( "getContextClassLoader", null); try { classLoader = (ClassLoader) method.invoke(Thread .currentThread(), null); } catch (IllegalAccessException e) { throw new LogConfigurationException( "Unexpected IllegalAccessException", e); } catch (InvocationTargetException e) { if (!(e.getTargetException() instanceof SecurityException)) throw new LogConfigurationException( "Unexpected InvocationTargetException", e .getTargetException()); } } catch (NoSuchMethodException e) { classLoader = (org.apache.commons.logging.LogFactory.class) .getClassLoader(); } return classLoader; } private static LogFactory getCachedFactory(ClassLoader contextClassLoader) { LogFactory factory = null; if (contextClassLoader != null) factory = (LogFactory) factories.get(contextClassLoader); return factory; } private static void cacheFactory(ClassLoader classLoader, LogFactory factory) { if (classLoader != null && factory != null) factories.put(classLoader, factory); } protected static LogFactory newFactory(final String factoryClass, final ClassLoader classLoader) throws LogConfigurationException { Object result = AccessController.doPrivileged(new PrivilegedAction() { public Object run() { Class logFactoryClass = null; try { if (classLoader != null) try { logFactoryClass = classLoader .loadClass(factoryClass); return (LogFactory) logFactoryClass.newInstance(); } catch (ClassNotFoundException ex) { if (classLoader == (org.apache.commons.logging.LogFactory.class) .getClassLoader()) throw ex; } catch (NoClassDefFoundError e) { if (classLoader == (org.apache.commons.logging.LogFactory.class) .getClassLoader()) throw e; } catch (ClassCastException e) { if (classLoader == (org.apache.commons.logging.LogFactory.class) .getClassLoader()) throw e; } logFactoryClass = Class.forName(factoryClass); return (LogFactory) logFactoryClass.newInstance(); } catch (Exception e) { if (logFactoryClass != null && !(org.apache.commons.logging.LogFactory.class) .isAssignableFrom(logFactoryClass)) return new LogConfigurationException( "The chosen LogFactory implementation does not extend LogFactory. Please check your configuration.", e); else return new LogConfigurationException(e); } } }); if (result instanceof LogConfigurationException) throw (LogConfigurationException) result; else return (LogFactory) result; } private static InputStream getResourceAsStream(final ClassLoader loader, final String name) { return (InputStream) AccessController .doPrivileged(new PrivilegedAction() { public Object run() { if (loader != null) return loader.getResourceAsStream(name); else return ClassLoader.getSystemResourceAsStream(name); } }); } public static final String FACTORY_PROPERTY = "org.apache.commons.logging.LogFactory"; public static final String FACTORY_DEFAULT = "org.apache.commons.logging.impl.LogFactoryImpl"; public static final String FACTORY_PROPERTIES = "commons-logging.properties"; protected static final String SERVICE_ID = "META-INF/services/org.apache.commons.logging.LogFactory"; protected static Hashtable factories = new Hashtable(); }
package com.ssafy.java; public class AlpaTest1 { public static void main(String[] args) { /*char alpa = 'A'; for(int i =0;i<5;i++) { for (int j = 0; j <= i; j++) { System.out.print(alpa + " "); alpa += 1; } System.out.println(); } System.out.println(); }*/ char alpha = 'A'; for(int i =0;i<5;i++) { for (int j = 0; j <= i; ++j) { System.out.printf("%3c", alpha++); } System.out.println(); } System.out.println(); } }
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF 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.apache.openwebbeans.se; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import jakarta.enterprise.context.ApplicationScoped; import jakarta.inject.Named; import org.junit.Test; public class CDILauncherTest { @Test public void namedRunnable() { assertFalse(MyRunnable.ran); CDILauncher.main(new String[]{ "--openwebbeans.main", "main", "--openwebbeans.disableDiscovery", "true", "--openwebbeans.classes", MyRunnable.class.getName() }); assertTrue(MyRunnable.ran); } @Test public void typedRunnable() { assertFalse(MyRunnable2.ran); CDILauncher.main(new String[]{ "--openwebbeans.main", MyRunnable2.class.getName(), "--openwebbeans.disableDiscovery", "true", "--openwebbeans.classes", MyRunnable2.class.getName() }); assertTrue(MyRunnable2.ran); } @Test public void mainArgs() { assertNull(MyMain.args); CDILauncher.main(new String[]{ "--openwebbeans.main", MyMain.class.getName(), "--openwebbeans.disableDiscovery", "true", "--openwebbeans.classes", MyMain.class.getName(), "--other", "yes", "and", "args" }); assertArrayEquals(new String[]{ "--other", "yes", "and", "args" }, MyMain.args); } @Named("main") @ApplicationScoped public static class MyRunnable implements Runnable { static boolean ran = false; @Override public void run() { ran = true; } } @ApplicationScoped public static class MyRunnable2 implements Runnable { static boolean ran = false; @Override public void run() { ran = true; } } @ApplicationScoped public static class MyMain { static String[] args; public void main(final String... args) { MyMain.args = args; } } }
/** * @(#) OrderNoServiceFileGenerator.java * module : CodeGenerator * version : 版本管理系统中的文件版本 * date : 2009-8-5 * name : 马仁配 */ package com.allinpay.generator.tp.generator; import java.io.File; import com.allinpay.util.StringUtil; /** * <pre> * 如果有任何对代码的修改,请按下面的格式注明修改的内容. * 序号 时间 作者 修改内容 * 1. 2009-8-5 马仁配 created this class. * </pre> */ public class OrderNoServiceFileGenerator extends AbstractCodeGenerator { public OrderNoServiceFileGenerator() { setTemplateFile("ebankOrderNoService.html"); setModuleFilePath("src/main/java/"); } /* * (non-Javadoc) * * @see com.allinpay.generator.tp.generator.AbstractCodeGenerator# * createEmptyGeneratedFile(java.lang.String, java.lang.String) */ @Override public File createEmptyGeneratedFile(String filePath, String fileName) { String dir = getGeneratedFilePath() + File.separator + getModuleFilePath() + File.separator; new File(dir).mkdirs(); String filepath = new StringBuffer(dir).append(File.separator) .append(StringUtil.capFirst(fileName)).append("OrderNoService.java").toString(); File file = new File(filepath); return file; } /* * (non-Javadoc) * * @see com.allinpay.generator.tp.generator.AbstractCodeGenerator# * getPackageIdentifier() */ @Override public String getPackageIdentifier() { return ""; } /* * (non-Javadoc) * * @see com.allinpay.generator.ibatis.ICodeGenerator#getName() */ public String getName() { return "OrderNoServiceFileGenerator"; } }
public class Player { private int id; private String name; private int currentPosition; private static int i=1; public Player( String name) { super(); this.id = getUniqueInd(); this.name = name; this.currentPosition=0; } private int getUniqueInd() { return i++; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getCurrentPosition() { return currentPosition; } public void setCurrentPosition(int currentPosition) { this.currentPosition = currentPosition; } }
package com.passing.hibernate.beans; /** * TbEnWord generated manually */ public class TbEnExtdWord extends AbstractTbEnExtdWord implements java.io.Serializable { // Constructors /** default constructor */ public TbEnExtdWord() { } /** full constructor */ public TbEnExtdWord(int dict_id, int word_id, int extd_word_id, String extd_word) { super(dict_id, word_id, extd_word_id, extd_word); } }
package com.jim.multipos.ui.mainpospage.dialogs; import android.app.Dialog; import android.content.Context; import android.os.Bundle; import android.os.Handler; import android.support.annotation.NonNull; import android.view.Window; import android.widget.EditText; import android.widget.TextView; import com.jim.mpviews.MpButton; import com.jim.multipos.R; import com.jim.multipos.data.prefs.PreferencesHelper; import com.jim.multipos.utils.SecurityTools; import com.jim.multipos.utils.UIUtils; import butterknife.BindView; import butterknife.ButterKnife; /** * Created by Portable-Acer on 28.11.2017. */ public class AccessToCancelDialog extends Dialog { public interface OnAccsessListner { void accsessSuccess(String reason); void onBruteForce(); } int countError = 0; @BindView(R.id.etPasswordEdit) EditText etPasswordEdit; @BindView(R.id.etDescription) EditText etDescription; @BindView(R.id.btnOK) MpButton btnOK; @BindView(R.id.btnCancel) MpButton btnCancel; @BindView(R.id.tvDialogTitle) TextView tvDialogTitle; private Context context; private OnAccsessListner listener; private PreferencesHelper preferencesHelper; private boolean isCancel; public AccessToCancelDialog(@NonNull Context context, OnAccsessListner listener, PreferencesHelper preferencesHelper) { super(context); this.context = context; this.listener = listener; this.preferencesHelper = preferencesHelper; } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.order_cancel_secure_dialog); getWindow().getDecorView().setBackgroundResource(R.color.colorTransparent); ButterKnife.bind(this); if(isCancel){ }else { } btnCancel.setOnClickListener(view -> dismiss()); btnOK.setOnClickListener(view -> { String passwordForCheck = etPasswordEdit.getText().toString(); if(passwordForCheck.isEmpty()){ etPasswordEdit.setError(context.getString(R.string.password_cant_be_empty)); return; } String reason = etDescription.getText().toString(); if(reason.isEmpty()){ etDescription.setError(context.getString(R.string.please_enter_reason_for_order)); return; } if(preferencesHelper.checkEditOrderPassword(SecurityTools.md5(passwordForCheck))){ new Handler().postDelayed(() -> { listener.accsessSuccess(reason); dismiss(); },300); UIUtils.closeKeyboard(etPasswordEdit,getContext()); }else { etPasswordEdit.setText(""); etPasswordEdit.setError(context.getString(R.string.password_is_incorrect)); countError ++; if(countError == 5) { new Handler().postDelayed(() -> { listener.onBruteForce(); dismiss(); },400); UIUtils.closeKeyboard(etPasswordEdit,getContext()); } } }); } }
package com.example.stockspring.service; import com.example.stockspring.model.Company; public interface CompanyRefService { public void insertCompany(Company company); }
package mude.srl.ssc.config; import java.io.IOException; import java.util.Properties; import org.quartz.JobListener; import org.quartz.Scheduler; import org.quartz.TriggerListener; import org.quartz.ee.servlet.QuartzInitializerListener; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.config.AutowireCapableBeanFactory; import org.springframework.beans.factory.config.PropertiesFactoryBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.io.ClassPathResource; import org.springframework.scheduling.quartz.SchedulerFactoryBean; import mude.srl.ssc.service.scheduler.job.listener.ReservationJobLinstener; import mude.srl.ssc.service.scheduler.jobs.utils.ReservationJobFactory; import mude.srl.ssc.service.scheduler.listener.ReservationSchedulerListener; import mude.srl.ssc.service.scheduler.trigger.listener.ReservetionTriggerListener; @Configuration public class SchedulerConfiguration { @Autowired private ReservationJobFactory reservationJobFactory; @Autowired private AutowireCapableBeanFactory capableBeanFactory; @Bean(name = "scheduler") public Scheduler scheduler() throws Exception { return schedulerFactoryBean().getScheduler(); } @Bean public SchedulerFactoryBean schedulerFactoryBean() throws IOException { SchedulerFactoryBean factory = new SchedulerFactoryBean(); factory.setOverwriteExistingJobs(true); // Delayed startup //factory.setStartupDelay(20); // Loading quartz data source configuration factory.setQuartzProperties(quartzProperties()); // Custom Job Factory for Spring Injection factory.setJobFactory(reservationJobFactory); /*********Global listener configuration******************/ TriggerListener reservationListener = new ReservetionTriggerListener(); capableBeanFactory.autowireBean(reservationListener); JobListener reservationJobListener = new ReservationJobLinstener(); capableBeanFactory.autowireBean(reservationJobListener); factory.setGlobalTriggerListeners(reservationListener); factory.setGlobalJobListeners(reservationJobListener); ReservationSchedulerListener shedulerListener = new ReservationSchedulerListener(); capableBeanFactory.autowireBean(shedulerListener); factory.setSchedulerListeners(shedulerListener); return factory; } @Bean public Properties quartzProperties() throws IOException { PropertiesFactoryBean propertiesFactoryBean = new PropertiesFactoryBean(); System.out.println("testing environment quartz To configure"); propertiesFactoryBean.setLocation(new ClassPathResource("/quartz.properties")); //Properties in quartz.properties are read and injected before the object is initialized propertiesFactoryBean.afterPropertiesSet(); return propertiesFactoryBean.getObject(); } /* * quartz Initialization listener */ @Bean public QuartzInitializerListener executorListener() { return new QuartzInitializerListener(); } }
package com.home.gfg; import com.home.common.BST; import com.home.common.BinaryTree; import com.home.common.DoublyLinkedList; import com.home.common.Heap; import com.home.common.LinkedList; import com.home.common.MaxHeap; import com.home.common.MinHeap; import com.home.common.Sorting; public class DataStructureTesting { public static void main(String[] args) throws IllegalAccessException { LinkedList<String> list = new LinkedList<String>(); list.addNode("ankush"); list.addNode("jain"); list.addNode("ivy"); list.printLL(); list.remove("ivy"); list.printLL(); list.reverse(); list.printLL(); LinkedList<Character> strList = new LinkedList<Character>(); strList.addNode('i'); strList.addNode('c'); strList.addNode('i'); strList.addNode('c'); strList.addNode('i'); System.out.println("Is the linked list a palindrome : " + strList.isPalindrome()); strList.pairWiseSwap(); System.out.println("linked list after pairwise swap :"); strList.printLL(); // BinaryTree<Integer> tree = new BinaryTree<Integer>(); BST<Integer> tree = new BST<Integer>(); tree.addNode(2); tree.addNode(8); tree.addNode(9); tree.addNode(1); tree.addNode(4); tree.addNode(5); tree.addNode(3); System.out.println("isSumTree : " + tree.isSumTree()); System.out.println("Ancestors of 5 are : "); tree.printAncestors(5); System.out.println("height of tree: " + tree.getHeight()); System.out.println("size of tree: " + tree.getSize()); System.out.println("diameter of tree : " + tree.getDiameter()); System.out.println("is tree height balanced : " + tree.isHeightBalanced()); tree.printTree(); System.out.println("LCA of 3 and 9 is : " + tree.findLowestCommonAncestor(3, 9).getData()); System.out.println("mirror of the tree : "); tree.mirrorTree(); tree.printTree(); System.out.println("DLL from tree : "); DoublyLinkedList<Integer> dll = tree.toDll(); dll.printLL(); System.out.println("Max heap :"); Integer[] arr = {2,4,3,5,1,8,7,6,9}; Heap<Integer> maxHeap = new MaxHeap<Integer>(arr, 9); maxHeap.printHeap(); System.out.println("Min heap :"); Heap<Integer> minHeap = new MinHeap<Integer>(arr, 9); minHeap.printHeap(); //System.out.println("Selection sort : "); //Sorting.selectionSort(arr); //System.out.println("bubble sort : "); //Sorting.bubbleSort(arr); //System.out.println("inserton sort : "); //Sorting.insertionSort(arr); System.out.println("quick sort : "); Sorting.quickSort(arr); Integer[] arrToBst = {1,2,3,4,5,6,7,8,9}; BST<Integer> bst = new BST<Integer>(); bst.makeBstFromSortedArr(arrToBst); bst.printTree(); } }
package com.company.model; public class Favorito { public String nombre; }
package com.lanthaps.identime.service; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.lanthaps.identime.model.*; import com.lanthaps.identime.repository.*; /** * A SettingService provides a way to retrieve and modify settings. * @author Andrew Miller */ @Transactional @Service public class SettingServiceImpl implements SettingService { private StringSettingRepository stringSettings; private IntSettingRepository intSettings; private BooleanSettingRepository booleanSettings; @Autowired public void setStringSettings(StringSettingRepository stringSettings) { this.stringSettings = stringSettings; } @Autowired public void setIntSettings(IntSettingRepository intSettings) { this.intSettings = intSettings; } @Autowired public void setBooleanSettings(BooleanSettingRepository booleanSettings) { this.booleanSettings = booleanSettings; } public SettingServiceImpl() {}; public static SettingInformation<String> baseURL = new SettingInformation<String>(String.class, "web.baseURL", "Base URL for the web application (no trailing /)", "."), siteName = new SettingInformation<String>(String.class, "web.siteName", "Name of your service", "MyIdentime"), headerLogo = new SettingInformation<String>(String.class, "web.headerLogo", "URL of site logo image (or blank)", ""), siteNotice = new SettingInformation<String>(String.class, "web.notice", "Notice to display to all users", ""), emailFrom = new SettingInformation<String>(String.class, "email.from", "From e-mail for e-mails sent out", "identime-admin@example.org"), emailServer = new SettingInformation<String>(String.class, "email.server", "E-mail server to send e-mails from", "smtp.example.org"), emailProtocol = new SettingInformation<String>(String.class, "email.protocol", "Protocol to use to send e-mail", "smtp"), emailUsername = new SettingInformation<String>(String.class, "email.username", "Username to use to send e-mail (or blank)", ""), emailPassword = new SettingInformation<String>(String.class, "email.password", "Password to use to send e-mail", ""); public static SettingInformation<Integer> emailPort = new SettingInformation<Integer>(Integer.class, "email.port", "Port to use to send e-mail", 25), approvalDuration = new SettingInformation<Integer>(Integer.class, "openid.approvalDuration", "The time (in seconds) that OpenID site approvals last before expiring", 3600 * 24 * 2), resetEmailDelayDuration = new SettingInformation<Integer>(Integer.class, "account.resetEmailDelayDuration", "The time (in seconds) after getting a reset password e-mail that another can be sent", 3600 * 2), tokenExpiryTime = new SettingInformation<Integer>(Integer.class, "account.tokenExpiryTime", "The time (in seconds) that a reset password token is valid for", 3600 * 24 * 2); public static SettingInformation<Boolean> shutdownMode = new SettingInformation<Boolean>(Boolean.class, "admin.shutdown", "Shut down most functionality to non adminpanel users, for maintenance?", false); private static final SettingInformation<?>[] allSettings = { baseURL, siteName, headerLogo, siteNotice, shutdownMode, emailFrom, emailServer, emailProtocol, emailPort, emailUsername, emailPassword, approvalDuration, resetEmailDelayDuration, tokenExpiryTime }; /** * @return The set of all settings that can be set. */ public SettingInformation<?>[] getAllSettings() { return allSettings; } public String loadStringSetting(SettingInformation<String> settingInfo) { StringSetting s = stringSettings.findOne(settingInfo.getName()); if (s == null) return settingInfo.getDefaultValue(); return s.getStringValue(); } public boolean loadBooleanSetting(SettingInformation<Boolean> settingInfo) { BooleanSetting s = booleanSettings.findOne(settingInfo.getName()); if (s == null) return settingInfo.getDefaultValue(); return s.getBooleanValue(); } public int loadIntSetting(SettingInformation<Integer> settingInfo) { IntSetting s = intSettings.findOne(settingInfo.getName()); if (s == null) return settingInfo.getDefaultValue(); return s.getIntValue(); } public void saveStringSetting(SettingInformation<String> settingInfo, String value) { StringSetting s = new StringSetting(); s.setName(settingInfo.getName()); s.setStringValue(value); stringSettings.save(s); } public void saveBooleanSetting(SettingInformation<Boolean> settingInfo, boolean value) { BooleanSetting s = new BooleanSetting(); s.setName(settingInfo.getName()); s.setBooleanValue(value); booleanSettings.save(s); } public void saveIntSetting(SettingInformation<Integer> settingInfo, int value) { IntSetting s = new IntSetting(); s.setName(settingInfo.getName()); s.setIntValue(value); intSettings.save(s); } @Override public boolean isShutdown() { return loadBooleanSetting(shutdownMode); } }
package de.zarncke.lib.thread; import java.util.Collection; import java.util.Map; import de.zarncke.lib.block.Task; import de.zarncke.lib.coll.Elements; import de.zarncke.lib.coll.L; import de.zarncke.lib.data.HasSelfInfo; import de.zarncke.lib.i18n.Translations; import de.zarncke.lib.lang.CodeResponsible; import de.zarncke.lib.lang.Piece; import de.zarncke.lib.log.Log; import de.zarncke.lib.log.group.GroupingLog; import de.zarncke.lib.sys.Health; import de.zarncke.lib.sys.module.AbstractModule; import de.zarncke.lib.sys.module.Module; /** * A {@link Module} for monitoring the {@link Log logging system} with special support for {@link GroupingLog}. * * @author Gunnar Zarncke */ public class TaskModule extends AbstractModule implements CodeResponsible { private final double plannedTasks; public TaskModule(final double plannedTasks) { this.plannedTasks = plannedTasks; } @Override public Health getHealth() { return Health.VIRGIN; } private Collection<TaskThread> getTaskThreads() { return L.copy(Elements.checkedIterable(ThreadUtil.getChildThreads(ThreadUtil.getRootThreadGroup(), true), TaskThread.class).iterator()); } @Override public double getLoad() { return getTaskThreads().size() / this.plannedTasks; } @Override public State getState() { return this.state; } @Override public Translations getName() { return new Translations("Tasks"); } @Override protected void doShutdown() { for (TaskThread tt : getTaskThreads()) { tt.shutdown(); } } @Override protected void doRecovery() { for (TaskThread tt : getTaskThreads()) { tt.interrupt(); } } @Override public String toString() { return "tasks"; } @Override public String getMetaInformation() { StringBuilder sb = new StringBuilder(); for (TaskThread tt : getTaskThreads()) { sb.append(tt.getName()).append(":"); Task current = tt.getCurrentTask(); if (current != null) { sb.append(" current:\n"); printTask(current, sb); sb.append(" all:\n"); } for (Task task : tt.getTasks()) { printTask(task, sb); } } return sb.toString(); } public void printTask(final Task task, final StringBuilder buffer) { buffer.append(" ").append(task.getClass().getSimpleName()).append(":"); if (task instanceof HasSelfInfo) { buffer.append("\n"); for (Map.Entry<String, ?> me : ((HasSelfInfo) task).getSelfInfo().entrySet()) { buffer.append(" ").append(me.getKey()).append(":").append(me.getValue()).append("\n"); } } else { buffer.append(task.toString()); } buffer.append("\n"); } @Override public boolean isResponsibleFor(final Piece code) { if (code.getName().startsWith("de.zarncke.lib.thread.")) { return true; } return false; } }
public class ThreadPools extends Thread { static int cid = 0; private ThreadLocal tl = new ThreadLocal() { public Object initialValue() { return ++cid; } }; ThreadPools(String name) { super(name); } public void run() { System.out.println(Thread.currentThread().getName() + " creating with customer id" + tl.get()); } public static void main(String[] args) { ThreadPools p1 = new ThreadPools("abc"); ThreadPools p2 = new ThreadPools("def"); ThreadPools p3 = new ThreadPools("mnop"); p1.start(); p2.start(); p3.start(); } }
package com.storedata.com.checklist; import android.support.v7.widget.RecyclerView; import android.view.View; import android.widget.EditText; import android.widget.ImageView; import com.storedata.com.R; /** * Created by ${3embed} on ${27-10-2017}. * Banglore */ public class CheckLIstItemViewHolder extends RecyclerView.ViewHolder{ public EditText addtoDo; public ImageView crossTodo; public CheckLIstItemViewHolder(View itemView) { super(itemView); addtoDo=itemView.findViewById(R.id.addtoDo); crossTodo=itemView.findViewById(R.id.crossTodo); } }
package com.dyny.gms.db.dao; import com.dyny.gms.db.pojo.CacheMethod; import com.dyny.gms.db.pojo.CacheMethodExample; import java.util.List; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @Mapper public interface CacheMethodMapper { long countByExample(CacheMethodExample example); int deleteByExample(CacheMethodExample example); int deleteByPrimaryKey(Integer id); int insert(CacheMethod record); int insertSelective(CacheMethod record); List<CacheMethod> selectByExample(CacheMethodExample example); CacheMethod selectByPrimaryKey(Integer id); int updateByExampleSelective(@Param("record") CacheMethod record, @Param("example") CacheMethodExample example); int updateByExample(@Param("record") CacheMethod record, @Param("example") CacheMethodExample example); int updateByPrimaryKeySelective(CacheMethod record); int updateByPrimaryKey(CacheMethod record); }
package codesum.lm.api; import java.io.File; import java.io.FilenameFilter; import org.apache.commons.io.FileUtils; import codesum.lm.main.CodeUtils; import codesum.lm.main.Settings; import codesum.lm.topicsum.TopicSum; import com.beust.jcommander.JCommander; import com.beust.jcommander.Parameter; import com.beust.jcommander.ParameterException; public class TrainTopicModel { /** Command line parameters */ public static class Parameters { @Parameter(names = { "-w", "--workingDir" }, description = "Working directory where the topic model creates necessary files", required = true) String workingDir; @Parameter(names = { "-d", "--projectsDir" }, description = "Directory containing project subdirectories", required = true) String projectsDir; @Parameter(names = { "-i", "--iterations" }, description = "Number of iterations for the topic model") int iterations = 1000; } public static void main(final String[] args) throws Exception { final Parameters params = new Parameters(); final JCommander jc = new JCommander(params); try { jc.parse(args); trainTopicModel(params.workingDir, params.projectsDir, params.iterations); } catch (final ParameterException e) { System.out.println(e.getMessage()); jc.usage(); } } /** * Train topic model for source code autofolding. * * <p> * Serialized trained model saved in * workingDir/TopicSum/Source/SamplerState.ser * * @param workingDir * working directory where the topic model creates necessary * files * @param projectsDir * directory containing project subdirectories * @param iterations * number of iterations for the topic model */ public static void trainTopicModel(final String workingDir, final String projectsDir, final int iterations) throws Exception { // Get all projects in projects directory final File projDir = new File(projectsDir); final String[] projects = projDir.list(new FilenameFilter() { @Override public boolean accept(final File current, final String name) { return new File(current, name).isDirectory(); } }); // Set paths and default code folder settings final Settings set = new Settings(workingDir, projectsDir, projects); // Create topic model base files in workingDir/TopicSum/Source/ CodeUtils.saveFileTokensByNodeID(set); // Train topic model and serialize model to // workingDir/TopicSum/Source/SamplerState.ser TopicSum.trainTopicSum(workingDir + "TopicSum/Source/", projects, "SamplerState.ser", iterations); // Delete temporary directories final File dir = new File(workingDir + "TopicSum/Source/"); for (final File file : dir.listFiles()) { if (!file.getName().contains("SamplerState.ser")) FileUtils.deleteDirectory(file); } } private TrainTopicModel() { } }
package com.revature.servlets; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import com.fasterxml.jackson.databind.ObjectMapper; import com.revature.models.Status; import com.revature.models.User; import com.revature.services.FinanceManagerReimbursementService; /** * Servlet implementation class DenyStatusController */ public class DenyStatusController extends HttpServlet { private static final long serialVersionUID = 1L; protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { } protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { ObjectMapper om = new ObjectMapper(); FinanceManagerReimbursementService fms = new FinanceManagerReimbursementService(); HttpSession session = req.getSession(); User u = (User) session.getAttribute("currUser"); Status s = new Status(); s = om.readValue(req.getInputStream(), Status.class); fms.updateStatus(s.getStatus(), s.getReimb_id(), u); } }