エンティティを Neo4j にインポートするのに 6 ~ 10 秒かかる理由を誰か説明してもらえますか?
Neo4jTemplate @Autowire
-dを持つカスタムリポジトリでSpring Data Neo4jを使用しています。したがって、エンティティを永続化するときは、 を呼び出しますtemplate.save(entity)
。ただし、エンティティは少し重いと言わざるを得ません。47 個のプロパティ、つまりフィールドがあり、そのうちの 3 つは@Indexed
注釈でマークされ、そのうちの 10 は でマークされた他のカスタム エンティティ@RelatedTo
です。5 つの@RelatedTo
フィールドのタイプはSet
です。つまり、実際には、この 1 つの重いエンティティをインポートすると、別の 10 ~ 15 のエンティティも永続化され、それに接続される可能性があります。
それは実際の問題ですか、それともプロセスをスピードアップするために私にできることはありますか?
私は周りを見回して見つけましたBatchInserter
が、インデックスを処理しません。この実装例を見つけましたが、他に選択肢がなければ試してみます。
だから私が理解しようとしているのは、重いエンティティが遅い永続化の理由であるか、それ以外の理由であるかということです。
私は Neo4j 1.8 を使用していますが、設定ファイルには触れていません。
どんな助けでも大歓迎です。ありがとう。
EDIT
@Michael Hunger:
- DB 内のデータ量には影響がないようです。
- 私は AspectJ を使用していないので、単純なマッピングを使用していると思いますよね? AspectJ を使用するとパフォーマンスが向上すると思いますか? -メソッド
にまたがる外部トランザクションがあるとは思わない。save
Wicket Web アプリケーションから DB を使用しています。たとえば、Jersey REST クライアントで Neo4j の REST API を使用した方がよいでしょうか?
- カスタム タイプのクラスにアトリビュートがある場合、たとえばArea area
、別のノードが自動的に作成されarea
、メイン ノードと の間の接続が作成されarea
ますよね?の必要はありませんtemplate.createRelationshipBetween(entity1, entity2, type, properties, true)
よね?これを使用するために私がしなければならないことは、area
属性を選択し、いくつかのインデックスを使用して正しいものを見つけてから、area
手動で接続します。そうですか?
これは私の保存方法がどのように見えるかです:
@Override
@Neo4jTransactional
public <T extends Identifiable> T save(T entity) {
T saved = template.save(entity);
Long savedId = saved.getId();
Node savedNode = getNode(savedId);
connectToContainerNode(savedNode, entity.getClass());
return saved;
}
エンティティの定義方法の例を次に示します (@ExcelCell 注釈は無視してください)。通常、永続エンティティによって拡張される抽象クラスがあります。私が何か間違ったことをしている場合は教えてください。
@NodeEntity
@SuppressWarnings("rawtypes")
public abstract class Building implements Identifiable {
@GraphId private Long id;
@ExcelCell( type={NewBuilding.class, RefurbishedBuilding.class, ReferenceBuilding.class}, cell=8, sheet=0, row=10)
@Fetch
private String concertoId;
@Fetch
@Indexed(indexName = "concertoUniqueId", indexType = IndexType.FULLTEXT)
private String concertoUniqueId;
@Fetch
@Indexed(indexName = "filename", indexType = IndexType.FULLTEXT)
private String filename;
@ExcelCells({
@ExcelCell( type={NewBuilding.class}, cell=7, sheet=1, row=56),
@ExcelCell( type={ReferenceBuilding.class}, cell=7, sheet=1, row=40),
@ExcelCell( type={RefurbishedBuilding.class}, cell=8, sheet=1, row=75),
})
@Fetch
private Double floorAreaAccordingToLocalDefinition;
@Fetch
private Double formulaCAP;
@Fetch
private HashMap formulaEFecmdirectMatrix;
@Fetch
private HashMap formulaEFecmindirectMatrix;
@Fetch
private Double formulaEM;
@Fetch
private Double formulaEN;
@Fetch
private Double formulaIN;
@Fetch
private HashMap formulaINecaaMatrix;
@Fetch
private Double formulaInvestmentAdditionalCosts;
@Fetch
private Double formulaInvestmentTotalCosts;
@ExcelCells({
@ExcelCell( type={NewBuilding.class}, cell=6, sheet=1, row=13),
@ExcelCell( type={ReferenceBuilding.class}, cell=6, sheet=1, row=21),
@ExcelCell( type={RefurbishedBuilding.class}, cell=6, sheet=1, row=22),
})
@Fetch
@Indexed(indexName = "name", indexType = IndexType.FULLTEXT)
private String name;
@ExcelCells({
@ExcelCell( type={NewBuilding.class}, cell=7, sheet=1, row=55),
@ExcelCell( type={ReferenceBuilding.class}, cell=7, sheet=1, row=39),
@ExcelCell( type={RefurbishedBuilding.class}, cell=8, sheet=1, row=74),
})
@Fetch
private Double rentableArea;
@ExcelCells({
@ExcelCell( type={NewBuilding.class}, cell=7, sheet=1, row=54),
@ExcelCell( type={ReferenceBuilding.class}, cell=7, sheet=1, row=38),
@ExcelCell( type={RefurbishedBuilding.class}, cell=8, sheet=1, row=73),
})
@Fetch
private Double totalCooledNetRoomArea;
@ExcelCells({
@ExcelCell( type={NewBuilding.class}, cell=7, sheet=1, row=52),
@ExcelCell( type={ReferenceBuilding.class}, cell=7, sheet=1, row=36),
@ExcelCell( type={RefurbishedBuilding.class}, cell=8, sheet=1, row=71),
})
@Fetch
private Double totalGrossFloorArea;
@ExcelCells({
@ExcelCell( type={NewBuilding.class}, cell=7, sheet=1, row=53),
@ExcelCell( type={ReferenceBuilding.class}, cell=7, sheet=1, row=37),
@ExcelCell( type={RefurbishedBuilding.class}, cell=8, sheet=1, row=72),
})
@Fetch
private Double totalHeatedNetRoomArea;
@ExcelRef
@RelatedTo(type = "area", elementClass = Area.class, direction=Direction.BOTH)
private Area area;
@ExcelRef
@RelatedTo(type = "community", elementClass = Community.class, direction=Direction.BOTH)
private Community community;
@ExcelRef
@RelatedTo(type = "costsForTheEntireBuilding", elementClass = CostsForTheEntireBuilding.class, direction=Direction.BOTH)
private CostsForTheEntireBuilding costsForTheEntireBuilding;
@ExcelRef
@RelatedTo(type = "country", elementClass = Country.class, direction=Direction.BOTH)
private Country country;
@ExcelRef
@RelatedTo(type = "project", elementClass = Project.class, direction=Direction.BOTH)
private Project project;
@RelatedTo(type = "costsForSelectedMeasuresOfBuilding", elementClass = CostsForSelectedMeasuresOfBuilding.class, direction=Direction.BOTH)
private Set<CostsForSelectedMeasuresOfBuilding> costsForSelectedMeasuresOfBuilding = new LinkedHashSet<CostsForSelectedMeasuresOfBuilding>();
@RelatedTo(type = "groupCostsOfBuildings", elementClass = GroupCostsOfBuilding.class, direction=Direction.BOTH)
private Set<GroupCostsOfBuilding> groupCostsOfBuildings = new LinkedHashSet<GroupCostsOfBuilding>();
@RelatedTo(type = "individualCostsOfBuilding", elementClass = IndividualCostsOfBuilding.class, direction=Direction.BOTH)
private Set<IndividualCostsOfBuilding> individualCostsOfBuilding = new LinkedHashSet<IndividualCostsOfBuilding>();
public Building(){}
// getters and setters ommitted
}
そして、これは抽象 Building クラスを拡張し、DB に永続化される NewBuilding クラスです。
@NodeEntity
public class NewBuilding extends Building {
@ExcelCell( type={}, cell=6, sheet=1, row=38)
@Fetch
private String applicableThresholdUnit;
@ExcelCell( type={}, cell=7, sheet=1, row=38)
@Fetch
private String applicableThresholdValue;
@ExcelDropdown(sheet=1, ids={1111})
private AtticType atticType;
@ExcelCell( type={}, cell=7, sheet=1, row=67)
@Fetch
private Double averageEnergyTransmittanceOfWindowsAccordingToRequirements;
@ExcelCell( type={}, cell=8, sheet=1, row=67)
@Fetch
private Double averageEnergyTransmittanceOfWindowsRealised;
@ExcelCell( type={}, cell=7, sheet=1, row=64)
@Fetch
private Double averageHTCFacadeAccordingToRequirements;
@ExcelCell( type={}, cell=10, sheet=1, row=64)
@Fetch
private Double averageHTCFacadeBuildingEnvelopeSurfaces;
@ExcelCell( type={}, cell=8, sheet=1, row=64)
@Fetch
private Double averageHTCFacadeRealised;
@ExcelCell( type={}, cell=7, sheet=1, row=65)
@Fetch
private Double averageHTCGroundFloorAccordingToRequirements;
@ExcelCell( type={}, cell=10, sheet=1, row=65)
@Fetch
private Double averageHTCGroundFloorBuildingEnvelopeSurfaces;
@ExcelCell( type={}, cell=8, sheet=1, row=65)
@Fetch
private Double averageHTCGroundFloorRealised;
@ExcelCell( type={}, cell=7, sheet=1, row=63)
@Fetch
private Double averageHTCRoofAccordingToRequirements;
@ExcelCell( type={}, cell=10, sheet=1, row=63)
@Fetch
private Double averageHTCRoofBuildingEnvelopeSurfaces;
@ExcelCell( type={}, cell=8, sheet=1, row=63)
@Fetch
private Double averageHTCRoofRealised;
@ExcelCell( type={}, cell=7, sheet=1, row=66)
@Fetch
private Double averageHTCWindowsAccordingToRequirements;
@ExcelCell( type={}, cell=10, sheet=1, row=66)
@Fetch
private Double averageHTCWindowsFloorBuildingEnvelopeSurfaces;
@ExcelCell( type={}, cell=8, sheet=1, row=66)
@Fetch
private Double averageHTCWindowsFloorRealised;
@ExcelDropdown(sheet=1, ids={1110})
private BasementType basementType;
@ExcelDropdown(sheet=1, ids={1636}, type={NewBuilding.class, })
private BuildingIsOwnedOrRented buildingIsOwnedOrRented;
@ExcelDropdown(sheet=1, ids={1635}, type={NewBuilding.class, })
private BuildingIsPrivateOrPublic buildingIsPrivateOrPublic;
@ExcelDropdown(sheet=1, ids={1112})
private BuildingType buildingType;
@ExcelCell( type={}, cell=10, sheet=1, row=73)
@Fetch
private Double calculatedFinalEnergyDemandForCoolingElectricity;
@ExcelCell( type={}, cell=11, sheet=1, row=73)
@Fetch
private Double calculatedFinalEnergyDemandForCoolingNonElectricity;
@ExcelCell( type={}, cell=8, sheet=1, row=73)
@Fetch
private Double calculatedFinalEnergyDemandForDomesticHotWaterElectricity;
@ExcelCell( type={}, cell=9, sheet=1, row=73)
@Fetch
private Double calculatedFinalEnergyDemandForDomesticHotWaterNonElectricity;
@ExcelCell( type={}, cell=6, sheet=1, row=73)
@Fetch
private Double calculatedFinalEnergyDemandForHeatingElectricity;
@ExcelCell( type={}, cell=7, sheet=1, row=73)
@Fetch
private Double calculatedFinalEnergyDemandForHeatingNonElectricity;
@ExcelCell( type={}, cell=10, sheet=1, row=72)
@Fetch
private Double calculatedFinalEnergyDemandOfRefBuildingForCoolingElectricity;
@ExcelCell( type={}, cell=11, sheet=1, row=72)
@Fetch
private Double calculatedFinalEnergyDemandOfRefBuildingForCoolingNonElectricity;
@ExcelCell( type={}, cell=8, sheet=1, row=72)
@Fetch
private Double calculatedFinalEnergyDemandOfRefBuildingForDomesticHotWaterElectricity;
@ExcelCell( type={}, cell=9, sheet=1, row=72)
@Fetch
private Double calculatedFinalEnergyDemandOfRefBuildingForDomesticHotWaterNonElectricity;
@ExcelCell( type={}, cell=6, sheet=1, row=72)
@Fetch
private Double calculatedFinalEnergyDemandOfRefBuildingForHeatingElectricity;
@ExcelCell( type={}, cell=7, sheet=1, row=72)
@Fetch
private Double calculatedFinalEnergyDemandOfRefBuildingForHeatingNonElectricity;
@ExcelCell( type={}, cell=12, sheet=1, row=72)
@Fetch
private Double calculatedFinalEnergyDemandOfRefBuildingForLightingAndOther;
@ExcelCell( type={}, cell=6, sheet=1, row=20 ,textToIgnore="month/year")
@Fetch
private String completionDate;
@ExcelCheckboxYesNo(sheet=1, yesId=1222, noId=1223)
@Fetch
private boolean contractingAgreementExists;
@ExcelCell( type={}, cell=7, sheet=1, row=40 ,textToIgnore="Remarks")
@Fetch
private String contractingAgreementRemarks;
@ExcelDropdown(sheet=1, ids={751}, type={NewBuilding.class, })
private DemonstrationActivityScheme demonstrationActivityScheme;
@ExcelCell( type={NewBuilding.class}, cell=2, sheet=5, row=11)
@Fetch
private Date endDateOfMonitoringPeriod;
@ExcelCell( type={NewBuilding.class}, cell=10, sheet=1, row=73)
@Fetch
private Double energyDemandCoolingElectricityConcerto;
@ExcelCell( type={NewBuilding.class}, cell=10, sheet=1, row=72)
@Fetch
private Double energyDemandCoolingElectricityNational;
@ExcelCell( type={NewBuilding.class}, cell=11, sheet=1, row=73)
@Fetch
private Double energyDemandCoolingNonElectricityConcerto;
@ExcelCell( type={NewBuilding.class}, cell=11, sheet=1, row=72)
@Fetch
private Double energyDemandCoolingNonElectricityNational;
@ExcelCell( type={NewBuilding.class}, cell=8, sheet=1, row=73)
@Fetch
private Double energyDemandDomesticHotWaterElectricityConcerto;
@ExcelCell( type={NewBuilding.class}, cell=8, sheet=1, row=72)
@Fetch
private Double energyDemandDomesticHotWaterElectricityNational;
@ExcelCell( type={NewBuilding.class}, cell=9, sheet=1, row=73)
@Fetch
private Double energyDemandDomesticHotWaterNonElectricityConcerto;
@ExcelCell( type={NewBuilding.class}, cell=9, sheet=1, row=72)
@Fetch
private Double energyDemandDomesticHotWaterNonElectricityNational;
@ExcelCell( type={NewBuilding.class}, cell=6, sheet=1, row=73)
@Fetch
private Double energyDemandHeatingElectricityConcerto;
@ExcelCell( type={NewBuilding.class}, cell=6, sheet=1, row=72)
@Fetch
private Double energyDemandHeatingElectricityNational;
@ExcelCell( type={NewBuilding.class}, cell=7, sheet=1, row=73)
@Fetch
private Double energyDemandHeatingNonElectricityConcerto;
@ExcelCell( type={NewBuilding.class}, cell=7, sheet=1, row=72)
@Fetch
private Double energyDemandHeatingNonElectricityNational;
@ExcelCell( type={NewBuilding.class}, cell=12, sheet=1, row=73)
@Fetch
private Double energyDemandLightingAndAllOtherElectricityConcerto;
@ExcelCell( type={NewBuilding.class}, cell=12, sheet=1, row=72)
@Fetch
private Double energyDemandLightingAndAllOtherElectricityNational;
@ExcelCheckboxYesNo(sheet=1, yesId=1188, noId=1189)
@Fetch
private boolean energyPerformanceCertificate;
@ExcelDropdown(sheet=1, ids={1103})
private EnergyPerformanceIndicatorRefersTo energyPerformanceIndicatorRefersTo;
@ExcelCell( type={}, cell=8, sheet=1, row=90 ,textToIgnore="specify capacity")
@Fetch
private String energyStorageCoolingCapacity;
@ExcelCell( type={}, cell=10, sheet=1, row=90 ,textToIgnore="Remarks")
@Fetch
private String energyStorageCoolingRemarks;
@ExcelDropdown(sheet=1, ids={2024})
private CapacityUnit energyStorageCoolingUnit;
@ExcelCheckbox(sheet=1, ids={1375})
@Fetch
private boolean energyStorageCoolingUsed;
@ExcelCell( type={}, cell=8, sheet=1, row=89 ,textToIgnore="specify capacity")
@Fetch
private String energyStorageDHWCapacity;
@ExcelCell( type={}, cell=10, sheet=1, row=89 ,textToIgnore="Remarks")
@Fetch
private String energyStorageDHWRemarks;
@ExcelDropdown(sheet=1, ids={2023})
private CapacityUnit energyStorageDHWUnit;
@ExcelCheckbox(sheet=1, ids={1371})
@Fetch
private boolean energyStorageDHWUsed;
@ExcelCell( type={}, cell=8, sheet=1, row=91 ,textToIgnore="specify capacity")
@Fetch
private String energyStorageElectricalCapacity;
@ExcelCell( type={}, cell=10, sheet=1, row=91 ,textToIgnore="Remarks")
@Fetch
private String energyStorageElectricalRemarks;
@ExcelDropdown(sheet=1, ids={2025})
private CapacityUnit energyStorageElectricalUnit;
@ExcelCheckbox(sheet=1, ids={1469})
@Fetch
private boolean energyStorageElectricalUsed;
@ExcelCell( type={}, cell=8, sheet=1, row=88 ,textToIgnore="specify capacity")
@Fetch
private String energyStorageSpaceHeatingCapacity;
@ExcelCell( type={}, cell=10, sheet=1, row=88 ,textToIgnore="Remarks")
@Fetch
private String energyStorageSpaceHeatingRemarks;
@ExcelDropdown(sheet=1, ids={2022})
private CapacityUnit energyStorageSpaceHeatingUnit;
@ExcelCheckbox(sheet=1, ids={1370})
@Fetch
private boolean energyStorageSpaceHeatingUsed;
@ExcelCell( type={}, cell=8, sheet=1, row=87 ,textToIgnore="specify capacity")
@Fetch
private String energyStorageThermalCapacity;
@ExcelCell( type={}, cell=10, sheet=1, row=87 ,textToIgnore="Remarks")
@Fetch
private String energyStorageThermalRemarks;
@ExcelDropdown(sheet=1, ids={2021})
private CapacityUnit energyStorageThermalUnit;
@ExcelCheckbox(sheet=1, ids={1367})
@Fetch
private boolean energyStorageThermalUsed;
@Fetch
private Double formulaPEFec;
@Fetch
private Double formulaPEN;
@ExcelCheckbox(sheet=1, ids={2041})
@Fetch
private boolean indicatorContainsCooling;
@ExcelCell( type={}, cell=6, sheet=1, row=35)
@Fetch
private String indicatorContainsCoolingUnit;
@ExcelCell( type={}, cell=7, sheet=1, row=35)
@Fetch
private String indicatorContainsCoolingValue;
@ExcelCheckbox(sheet=1, ids={2040})
@Fetch
private boolean indicatorContainsDomesticHotWaterProduction;
@ExcelCell( type={}, cell=6, sheet=1, row=34)
@Fetch
private String indicatorContainsDomesticHotWaterProductionUnit;
@ExcelCell( type={}, cell=7, sheet=1, row=34)
@Fetch
private String indicatorContainsDomesticHotWaterProductionValue;
@ExcelCheckbox(sheet=1, ids={2042})
@Fetch
private boolean indicatorContainsLighting;
@ExcelCell( type={}, cell=6, sheet=1, row=37)
@Fetch
private String indicatorContainsLightingUnit;
@ExcelCell( type={}, cell=7, sheet=1, row=37)
@Fetch
private String indicatorContainsLightingValue;
@ExcelCheckbox(sheet=1, ids={2039})
@Fetch
private boolean indicatorContainsSpaceHeating;
@ExcelCell( type={}, cell=6, sheet=1, row=33)
@Fetch
private String indicatorContainsSpaceHeatingUnit;
@ExcelCell( type={}, cell=7, sheet=1, row=33)
@Fetch
private String indicatorContainsSpaceHeatingValue;
@ExcelCheckbox(sheet=1, ids={2038})
@Fetch
private boolean indicatorContainsVentilation;
@ExcelCell( type={}, cell=6, sheet=1, row=36)
@Fetch
private String indicatorContainsVentilationUnit;
@ExcelCell( type={}, cell=7, sheet=1, row=36)
@Fetch
private String indicatorContainsVentilationValue;
@ExcelCell( type={NewBuilding.class}, cell=6, sheet=1, row=14)
@Fetch
private String location;
@ExcelDropdown(sheet=1, ids={1101})
private MainCharacteristicsOfCertificate1 mainCharacteristicsOfCertificate1;
@ExcelDropdown(sheet=1, ids={1102})
private MainCharacteristicsOfCertificate2 mainCharacteristicsOfCertificate2;
@ExcelCell( type={}, cell=6, sheet=1, row=21)
@Fetch
private String nameOfAppliedBuildingCode;
@ExcelCell( type={}, cell=6, sheet=1, row=27)
@Fetch
private String nameOfCertificate;
@ExcelCell( type={}, cell=6, sheet=1, row=24)
@Fetch
private String networks;
@ExcelCell( type={}, cell=6, sheet=1, row=48)
@Fetch
private String numberOfAppartmentsForResidentialBuilding;
@ExcelCell( type={NewBuilding.class}, cell=6, sheet=1, row=18)
@Fetch
private String numberOfBuildingsRepresentedByThisBuilding;
@ExcelCell( type={}, cell=6, sheet=1, row=49)
@Fetch
private String numberOfInhabitantsForResidentialBuilding;
@ExcelCell( type={}, cell=6, sheet=1, row=50)
@Fetch
private String numberOfOccupantsForNonResidentialBuilding;
@ExcelCell( type={}, cell=7, sheet=1, row=62)
@Fetch
private Double overallAverageHTCAccordingToRequirements;
@ExcelCell( type={}, cell=10, sheet=1, row=62)
@Fetch
private Double overallAverageHTCBuildingEnvelopeSurfaces;
@ExcelCell( type={}, cell=8, sheet=1, row=62)
@Fetch
private Double overallAverageHTCRealised;
@ExcelDropdown(sheet=1, ids={1109})
private PositionToNeighboringBuildings positionToNeighboringBuildings;
@ExcelCell( type={NewBuilding.class}, cell=6, sheet=1, row=23 ,textToIgnore="id of reference building")
@Fetch
private String referenceBuildingId;
@ExcelCell( type={}, cell=6, sheet=1, row=19 ,textToIgnore="month/year")
@Fetch
private String startDateOfConstructionWorks;
@ExcelCell( type={NewBuilding.class}, cell=2, sheet=5, row=10)
@Fetch
private Date startDateOfMonitoringPeriod;
@ExcelCheckboxYesNo(sheet=1, yesId=1443, noId=1444)
@Fetch
private boolean totalDomesticGasConsumptionIncludesGasForCooking;
@ExcelCell( type={NewBuilding.class}, cell=7, sheet=1, row=58)
@Fetch
private Double totalGrossBuildingVolumeExternal;
@ExcelCell( type={NewBuilding.class}, cell=7, sheet=1, row=60)
@Fetch
private Double totalNetCooledVolumeInternal;
@ExcelCell( type={NewBuilding.class}, cell=7, sheet=1, row=59)
@Fetch
private Double totalNetHeatedVolumeInternal;
@ExcelCell( type={}, cell=6, sheet=1, row=31)
@Fetch
private String unitOfIndicator;
@ExcelCell( type={}, cell=7, sheet=1, row=31)
@Fetch
private String valueOfIndicator;
@ExcelCell( type={}, cell=6, sheet=1, row=22 ,textToIgnore="year")
@Fetch
private String yearOfPublicationOfAppliedBuildingCode;
@ExcelRef
@RelatedTo(type = "characterisationOfAppliedBuildingFeatures", elementClass = CharacterisationOfAppliedBuildingFeatures.class, direction=Direction.BOTH)
private CharacterisationOfAppliedBuildingFeatures characterisationOfAppliedBuildingFeatures;
@ExcelCollection(type=BuildingEnergyService.class, start=0, end=5)
@RelatedTo(type = "appliedEnergyServices", elementClass = BuildingEnergyService.class, direction=Direction.BOTH)
private Set<BuildingEnergyService> appliedEnergyServices = new LinkedHashSet<BuildingEnergyService>();
@ExcelCollection(type=MonitoringYearTotal.class, start=0, end=5, orientation=Orientation.SHEET)
@RelatedTo(type = "monitoringYears", elementClass = MonitoringYearTotal.class, direction=Direction.BOTH)
private Set<MonitoringYearTotal> monitoringYears = new LinkedHashSet<MonitoringYearTotal>();
public NewBuilding(){}
// getters and setters ommitted
}