1 28 package net.sf.jasperreports.crosstabs.base; 29 30 import java.io.Serializable ; 31 32 import net.sf.jasperreports.crosstabs.JRCrosstabBucket; 33 import net.sf.jasperreports.crosstabs.fill.calculation.BucketDefinition; 34 import net.sf.jasperreports.engine.JRConstants; 35 import net.sf.jasperreports.engine.JRExpression; 36 import net.sf.jasperreports.engine.base.JRBaseObjectFactory; 37 38 44 public class JRBaseCrosstabBucket implements JRCrosstabBucket, Serializable 45 { 46 private static final long serialVersionUID = JRConstants.SERIAL_VERSION_UID; 47 48 protected byte order = BucketDefinition.ORDER_ASCENDING; 49 protected JRExpression expression; 50 protected JRExpression comparatorExpression; 51 52 protected JRBaseCrosstabBucket() 53 { 54 } 55 56 public JRBaseCrosstabBucket(JRCrosstabBucket bucket, JRBaseObjectFactory factory) 57 { 58 factory.put(bucket, this); 59 60 this.order = bucket.getOrder(); 61 this.expression = factory.getExpression(bucket.getExpression()); 62 this.comparatorExpression = factory.getExpression(bucket.getComparatorExpression()); 63 } 64 65 public byte getOrder() 66 { 67 return order; 68 } 69 70 public JRExpression getExpression() 71 { 72 return expression; 73 } 74 75 public JRExpression getComparatorExpression() 76 { 77 return comparatorExpression; 78 } 79 } 80 | Popular Tags |