1
0
mirror of https://github.com/chatopera/cosin.git synced 2025-08-01 16:38:02 +08:00

Remove // TODO Auto-generated method stub

This commit is contained in:
dengchao@xgtl 2020-04-17 14:45:41 +08:00
parent 55c1d2b159
commit 401fcfaa93
8 changed files with 333 additions and 317 deletions

View File

@ -1,39 +1,39 @@
/* /*
* Copyright (C) 2017 优客服-多渠道客服系统 * Copyright (C) 2017 优客服-多渠道客服系统
* Modifications copyright (C) 2018-2019 Chatopera Inc, <https://www.chatopera.com> * Modifications copyright (C) 2018-2019 Chatopera Inc, <https://www.chatopera.com>
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.chatopera.cc.config; package com.chatopera.cc.config;
import com.lmax.disruptor.ExceptionHandler; import com.lmax.disruptor.ExceptionHandler;
public class CSKeFuExceptionHandler implements ExceptionHandler<Object>{ public class CSKeFuExceptionHandler implements ExceptionHandler<Object>{
@Override @Override
public void handleEventException(Throwable ex, long arg1, Object arg2) { public void handleEventException(Throwable ex, long arg1, Object arg2) {
ex.printStackTrace(); ex.printStackTrace();
} }
@Override @Override
public void handleOnShutdownException(Throwable ex) { public void handleOnShutdownException(Throwable ex) {
} }
@Override @Override
public void handleOnStartException(Throwable ex) { public void handleOnStartException(Throwable ex) {
// TODO Auto-generated method stub
} }
} }

View File

@ -1,227 +1,227 @@
/* /*
* Copyright (C) 2017 优客服-多渠道客服系统 * Copyright (C) 2017 优客服-多渠道客服系统
* Modifications copyright (C) 2018-2019 Chatopera Inc, <https://www.chatopera.com> * Modifications copyright (C) 2018-2019 Chatopera Inc, <https://www.chatopera.com>
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.chatopera.cc.util.bi; package com.chatopera.cc.util.bi;
import com.chatopera.cc.util.bi.model.Level; import com.chatopera.cc.util.bi.model.Level;
import com.chatopera.cc.util.bi.model.RequestData; import com.chatopera.cc.util.bi.model.RequestData;
import com.chatopera.cc.util.bi.model.ValueData; import com.chatopera.cc.util.bi.model.ValueData;
import org.apache.lucene.queryparser.flexible.core.nodes.PathQueryNode.QueryText; import org.apache.lucene.queryparser.flexible.core.nodes.PathQueryNode.QueryText;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
public class CubeReportData implements ReportData, Cloneable { public class CubeReportData implements ReportData, Cloneable {
/** /**
* *
*/ */
private static final long serialVersionUID = 3987533346101055742L; private static final long serialVersionUID = 3987533346101055742L;
private Exception exception ; private Exception exception ;
private Level row ; private Level row ;
private Level col ; private Level col ;
private int pageSize ; private int pageSize ;
private int page ; private int page ;
private long numFound = 0 ; private long numFound = 0 ;
private RequestData reqdata; private RequestData reqdata;
private QueryText queryText ; private QueryText queryText ;
private Map<String , Object> options ; private Map<String , Object> options ;
private long queryTime ; private long queryTime ;
private long total ; private long total ;
private Date createTime; private Date createTime;
private List<List<ValueData>> data ; private List<List<ValueData>> data ;
private String viewData ; private String viewData ;
public void setRow(Level row) { public void setRow(Level row) {
this.row = row; this.row = row;
} }
public void setCol(Level col) { public void setCol(Level col) {
this.col = col; this.col = col;
} }
public void setData(List<List<ValueData>> data) { public void setData(List<List<ValueData>> data) {
this.data = data; this.data = data;
} }
@Override @Override
public Level getRow() { public Level getRow() {
return row; return row;
} }
@Override @Override
public Level getCol() { public Level getCol() {
return col; return col;
} }
@Override @Override
public List<List<ValueData>> getData() { public List<List<ValueData>> getData() {
return data; return data;
} }
public String getViewData() { public String getViewData() {
return viewData; return viewData;
} }
public void setViewData(String viewData) { public void setViewData(String viewData) {
this.viewData = viewData; this.viewData = viewData;
} }
public ReportData clone(){ public ReportData clone(){
try { try {
return (ReportData) super.clone() ; return (ReportData) super.clone() ;
} catch (CloneNotSupportedException e) { } catch (CloneNotSupportedException e) {
// TODO Auto-generated catch block // TODO Auto-generated catch block
e.printStackTrace(); e.printStackTrace();
} }
return null ; return null ;
} }
public long getNumFound() { public long getNumFound() {
return numFound; return numFound;
} }
public void setNumFound(long l) { public void setNumFound(long l) {
this.numFound = l; this.numFound = l;
} }
public int getPageSize() { public int getPageSize() {
return pageSize; return pageSize;
} }
public void setPageSize(int pageSize) { public void setPageSize(int pageSize) {
this.pageSize = pageSize; this.pageSize = pageSize;
} }
@Override @Override
public void exchangeColRow() { public void exchangeColRow() {
Level temp = this.col ; Level temp = this.col;
this.col = this.row ; this.col = this.row;
this.row = temp ; this.row = temp;
int colspan = this.col.getColspan() ; int colspan = this.col.getColspan();
this.col.setColspan(this.col.getRowspan()) ; this.col.setColspan(this.col.getRowspan());
this.col.setRowspan(colspan) ; this.col.setRowspan(colspan);
colspan = this.row.getColspan() ; colspan = this.row.getColspan();
this.row.setColspan(this.row.getRowspan()) ; this.row.setColspan(this.row.getRowspan());
this.row.setRowspan(colspan) ; this.row.setRowspan(colspan) ;
List<List<ValueData>> tempList = new ArrayList<List<ValueData>>(); List<List<ValueData>> tempList = new ArrayList<List<ValueData>>();
for(int i=0 ; i<data.size() ; i++){ for(int i=0 ; i<data.size() ; i++){
for(int j=0 ; j<data.get(i).size() ; j++){ for(int j=0 ; j<data.get(i).size() ; j++){
if(tempList.size()<=j){ if(tempList.size()<=j){
tempList.add(new ArrayList<ValueData>()) ; tempList.add(new ArrayList<ValueData>()) ;
} }
if(tempList.get(j)!=null){ if(tempList.get(j)!=null){
tempList.get(j).add(data.get(i).get(j)) ; tempList.get(j).add(data.get(i).get(j)) ;
} }
} }
} }
this.data.clear(); this.data.clear();
this.data = tempList ; this.data = tempList ;
} }
@Override @Override
public void merge(ReportData data) { public void merge(ReportData data) {
this.col.getChilderen().addAll(data.getCol().getChilderen()) ; this.col.getChilderen().addAll(data.getCol().getChilderen()) ;
if(this.row!=null && this.row.getTitle()!=null && data.getRow()!=null && data.getRow().getTitle()!=null){ if(this.row!=null && this.row.getTitle()!=null && data.getRow()!=null && data.getRow().getTitle()!=null){
List<?> titles = this.row.getTitle().get(this.row.getTitle().size()-1) ; List<?> titles = this.row.getTitle().get(this.row.getTitle().size()-1) ;
List<?> otitles = data.getRow().getTitle().get(data.getRow().getTitle().size()-1) ; List<?> otitles = data.getRow().getTitle().get(data.getRow().getTitle().size()-1) ;
for(int i=0 ; i<titles.size() ; i++){ for(int i=0 ; i<titles.size() ; i++){
for(int j=0 ; j<otitles.size() ; j++){ for(int j=0 ; j<otitles.size() ; j++){
if(titles.get(i).toString().equals(otitles.get(j).toString())){ if(titles.get(i).toString().equals(otitles.get(j).toString())){
this.data.get(i).addAll(data.getData().get(j)) ; this.data.get(i).addAll(data.getData().get(j)) ;
break ; break ;
} }
} }
} }
} }
this.col.init(); this.col.init();
} }
@Override @Override
public Date getDate() { public Date getDate() {
// TODO Auto-generated method stub
return createTime; return createTime;
} }
public Exception getException() { public Exception getException() {
return exception; return exception;
} }
public void setException(Exception exception) { public void setException(Exception exception) {
this.exception = exception; this.exception = exception;
} }
@Override @Override
public void setRequestData(RequestData data) { public void setRequestData(RequestData data) {
reqdata = data; reqdata = data;
} }
@Override @Override
public RequestData getRequestData() { public RequestData getRequestData() {
return reqdata; return reqdata;
} }
public int getPage() { public int getPage() {
return page; return page;
} }
public void setPage(int page) { public void setPage(int page) {
this.page = page; this.page = page;
} }
public QueryText getQueryText() { public QueryText getQueryText() {
return queryText; return queryText;
} }
public void setQueryText(QueryText queryText) { public void setQueryText(QueryText queryText) {
this.queryText = queryText; this.queryText = queryText;
} }
public Map<String, Object> getOptions() { public Map<String, Object> getOptions() {
return options; return options;
} }
public void setOptions(Map<String, Object> options) { public void setOptions(Map<String, Object> options) {
this.options = options; this.options = options;
} }
public long getQueryTime() { public long getQueryTime() {
return queryTime; return queryTime;
} }
public void setQueryTime(long queryTime) { public void setQueryTime(long queryTime) {
this.queryTime = queryTime; this.queryTime = queryTime;
} }
public long getTotal() { public long getTotal() {
return total; return total;
} }
public void setTotal(long total) { public void setTotal(long total) {
this.total = total; this.total = total;
} }
@Override @Override
public void setDate(Date createtime) { public void setDate(Date createtime) {
// TODO Auto-generated method stub
this.createTime = createtime; this.createTime = createtime;
} }
} }

View File

@ -528,7 +528,7 @@ public class UKExcelUtil {
} }
public String getHeadTitle() { public String getHeadTitle() {
// TODO Auto-generated method stub
return this.headTitle; return this.headTitle;
} }
@ -537,7 +537,7 @@ public class UKExcelUtil {
} }
public String getStartTime() { public String getStartTime() {
// TODO Auto-generated method stub
return this.startTime; return this.startTime;
} }
@ -546,7 +546,7 @@ public class UKExcelUtil {
} }
public String getEndTime() { public String getEndTime() {
// TODO Auto-generated method stub
return this.endTime; return this.endTime;
} }
@ -555,12 +555,12 @@ public class UKExcelUtil {
} }
public void createSheet(String sheetName) throws Exception { public void createSheet(String sheetName) throws Exception {
// TODO Auto-generated method stub
this.sheet = wb.createSheet(sheetName); this.sheet = wb.createSheet(sheetName);
} }
public int getRowNum() throws Exception { public int getRowNum() throws Exception {
// TODO Auto-generated method stub
return rowNum; return rowNum;
} }
@ -578,17 +578,17 @@ public class UKExcelUtil {
} }
public void setOut(OutputStream out) throws Exception { public void setOut(OutputStream out) throws Exception {
// TODO Auto-generated method stub
this.out = out; this.out = out;
} }
public int getPage() { public int getPage() {
// TODO Auto-generated method stub
return this.page; return this.page;
} }
public void setPage(int page) { public void setPage(int page) {
// TODO Auto-generated method stub
this.page = page; this.page = page;
} }
@ -610,12 +610,12 @@ public class UKExcelUtil {
} }
public ReportData getReportData() { public ReportData getReportData() {
// TODO Auto-generated method stub
return this.reportData; return this.reportData;
} }
public void setReportData(ReportData reportData) { public void setReportData(ReportData reportData) {
// TODO Auto-generated method stub
this.reportData = reportData; this.reportData = reportData;
} }

View File

@ -9,10 +9,16 @@
package mondrian.calc.impl; package mondrian.calc.impl;
import mondrian.calc.*; import mondrian.calc.TupleCursor;
import mondrian.olap.*; import mondrian.calc.TupleIterator;
import mondrian.calc.TupleList;
import mondrian.olap.Evaluator;
import mondrian.olap.Member;
import mondrian.olap.Util;
import java.util.*; import java.util.AbstractList;
import java.util.Collection;
import java.util.List;
/** /**
* Implementation of {@link TupleList} that stores tuples end-to-end in an * Implementation of {@link TupleList} that stores tuples end-to-end in an
@ -254,14 +260,14 @@ public class ArrayTupleList extends AbstractEndToEndTupleList
@Override @Override
public int getCount() { public int getCount() {
// TODO Auto-generated method stub
return count; return count;
} }
@Override @Override
public void setCount(int count) { public void setCount(int count) {
// TODO Auto-generated method stub
this.count = count; this.count = count;
} }
} }

View File

@ -14,7 +14,10 @@ import mondrian.calc.TupleList;
import mondrian.olap.Member; import mondrian.olap.Member;
import mondrian.olap.Util; import mondrian.olap.Util;
import java.util.*; import java.util.AbstractList;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/** /**
* Implementation of {@link mondrian.calc.TupleList} based on a list of * Implementation of {@link mondrian.calc.TupleList} based on a list of
@ -83,7 +86,7 @@ public class DelegatingTupleList extends AbstractTupleList
.get(0); .get(0);
} }
return subList.set(column, element); return subList.set(column, element);
}; }
}; };
} }
@ -125,13 +128,13 @@ public class DelegatingTupleList extends AbstractTupleList
public Member set(int column, Member element) { public Member set(int column, Member element) {
return list.get(index).set(index, element); return list.get(index).set(index, element);
}; }
}; };
} }
public List<Member> set(int index, List<Member> element) { public List<Member> set(int index, List<Member> element) {
return list.set(index, element); return list.set(index, element);
}; }
public int size() { public int size() {
return list.size(); return list.size();
@ -178,17 +181,17 @@ public class DelegatingTupleList extends AbstractTupleList
); );
} }
@Override @Override
public void setCount(int count) { public int getCount() {
// TODO Auto-generated method stub
this.count = count;
}
@Override return count;
public int getCount() { }
// TODO Auto-generated method stub
return count; @Override
} public void setCount(int count) {
this.count = count;
}
} }
// End DelegatingTupleList.java // End DelegatingTupleList.java

View File

@ -14,7 +14,10 @@ import mondrian.calc.TupleList;
import mondrian.olap.Member; import mondrian.olap.Member;
import mondrian.olap.Util; import mondrian.olap.Util;
import java.util.*; import java.util.AbstractList;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/** /**
* Implementation of {@link mondrian.calc.TupleList} that stores tuples * Implementation of {@link mondrian.calc.TupleList} that stores tuples
@ -143,19 +146,19 @@ public class ListTupleList extends AbstractEndToEndTupleList
return new AbstractTupleListIterator(); return new AbstractTupleListIterator();
} }
@Override @Override
public void setCount(int count) { public int getCount() {
// TODO Auto-generated method stub
this.count = count; return count;
} }
@Override
public void setCount(int count) {
this.count = count;
}
@Override
public int getCount() {
// TODO Auto-generated method stub
return count;
}
} }
// End ListTupleList.java // End ListTupleList.java

View File

@ -9,7 +9,9 @@
package mondrian.calc.impl; package mondrian.calc.impl;
import mondrian.calc.*; import mondrian.calc.TupleCursor;
import mondrian.calc.TupleIterator;
import mondrian.calc.TupleList;
import mondrian.olap.Evaluator; import mondrian.olap.Evaluator;
import mondrian.olap.Member; import mondrian.olap.Member;
@ -259,14 +261,14 @@ public class UnaryTupleList
@Override @Override
public int getCount() { public int getCount() {
// TODO Auto-generated method stub
return count; return count;
} }
@Override @Override
public void setCount(int count) { public void setCount(int count) {
// TODO Auto-generated method stub
this.count = count; this.count = count;
} }
} }

View File

@ -12,7 +12,9 @@
package mondrian.rolap; package mondrian.rolap;
import mondrian.calc.TupleList; import mondrian.calc.TupleList;
import mondrian.olap.*; import mondrian.olap.Axis;
import mondrian.olap.Member;
import mondrian.olap.Position;
import java.util.AbstractList; import java.util.AbstractList;
import java.util.List; import java.util.List;
@ -112,8 +114,8 @@ public class RolapAxis implements Axis {
@Override @Override
public int getDataSize() { public int getDataSize() {
// TODO Auto-generated method stub
return list.getCount(); return list.getCount();
} }
} }