1 /* 2 * Copyright (c) 2021 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 package ohos.devtools.services.memory.agentdao; 17 18 import ohos.devtools.services.memory.agentbean.ClassInfo; 19 20 import java.util.List; 21 22 /** 23 * ClassInfo Manager 24 * 25 * @since 2021/5/19 16:39 26 */ 27 public class ClassInfoManager { 28 /** 29 * insertClassInfo 30 * 31 * @param classInfo classInfo 32 */ insertClassInfo(ClassInfo classInfo)33 public void insertClassInfo(ClassInfo classInfo) { 34 new ClassInfoDao().insertClassInfo(classInfo); 35 } 36 37 /** 38 * Get all data to file 39 * 40 * @param sessionId sessionId 41 * @return List <ClassInfo> 42 */ getAllClassInfoData(Long sessionId)43 public List<ClassInfo> getAllClassInfoData(Long sessionId) { 44 return new ClassInfoDao().getAllClassInfoData(sessionId); 45 } 46 47 /** 48 * get ClassId By ClassName 49 * 50 * @param className className 51 * @return int 52 */ getClassIdByClassName(String className)53 public int getClassIdByClassName(String className) { 54 return new ClassInfoDao().getClassIdByClassName(className); 55 } 56 } 57